Реализовать лабораторную работу 5
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user