mirror of
https://github.com/bitwarden/server
synced 2025-12-25 04:33:26 +00:00
17 lines
375 B
C#
17 lines
375 B
C#
using System;
|
|
using System.Data;
|
|
using Dapper;
|
|
|
|
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);
|
|
}
|
|
}
|