12 lines
318 B
C#
12 lines
318 B
C#
namespace Messenger.Api.Data;
|
|
|
|
public static class UtcClock
|
|
{
|
|
// PostgreSQL timestamptz stores microseconds; keep the response identical to the saved value.
|
|
public static DateTime Now()
|
|
{
|
|
var ticks = DateTime.UtcNow.Ticks;
|
|
return new DateTime(ticks - ticks % 10, DateTimeKind.Utc);
|
|
}
|
|
}
|