mirror of
https://github.com/bitwarden/server.git
synced 2025-04-30 01:02:21 -05:00

* Enable Nullable In Unowned Repos * Update More Tests * Move to One If * Fix Collections * Format * Add Migrations * Move Pragma Annotation * Add Better Assert Message
20 lines
430 B
C#
20 lines
430 B
C#
using System.Data;
|
|
using Dapper;
|
|
|
|
#nullable enable
|
|
|
|
namespace Bit.Infrastructure.Dapper.Repositories;
|
|
|
|
public class DateTimeHandler : SqlMapper.TypeHandler<DateTime>
|
|
{
|
|
public override void SetValue(IDbDataParameter parameter, DateTime value)
|
|
{
|
|
parameter.Value = value;
|
|
}
|
|
|
|
public override DateTime Parse(object value)
|
|
{
|
|
return DateTime.SpecifyKind((DateTime)value, DateTimeKind.Utc);
|
|
}
|
|
}
|