From 0cf90e45be4fcc538fd559ef2a12debb3d0a1f6d Mon Sep 17 00:00:00 2001 From: MaksimChegulov Date: Wed, 14 Dec 2022 10:10:46 +0300 Subject: [PATCH] Poeple: simplified time cutting --- web/ASC.Web.Core/Notify/StudioNotifyService.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/web/ASC.Web.Core/Notify/StudioNotifyService.cs b/web/ASC.Web.Core/Notify/StudioNotifyService.cs index 717a3a3622..55260bd009 100644 --- a/web/ASC.Web.Core/Notify/StudioNotifyService.cs +++ b/web/ASC.Web.Core/Notify/StudioNotifyService.cs @@ -166,10 +166,16 @@ public class StudioNotifyService public void UserPasswordChange(UserInfo userInfo) { var auditEventDate = DateTime.UtcNow; - var accuracy = TimeSpan.FromSeconds(1); - var ticks = (auditEventDate.Ticks + (accuracy.Ticks / 2) + 1) / accuracy.Ticks; - auditEventDate = new DateTime(ticks * accuracy.Ticks, auditEventDate.Kind); + auditEventDate = new DateTime( + auditEventDate.Year, + auditEventDate.Month, + auditEventDate.Day, + auditEventDate.Hour, + auditEventDate.Minute, + auditEventDate.Second, + 0, + DateTimeKind.Utc); var hash = auditEventDate.ToString("s");