From 2c4dd3ea12c6f1057f84af9473179352092a34ee Mon Sep 17 00:00:00 2001 From: Thomas Avery <43214426+Thomas-Avery@users.noreply.github.com> Date: Mon, 21 Oct 2024 12:10:03 -0500 Subject: [PATCH] Fix swap notification commands to use UtcNow (#4919) --- .../Commands/MarkNotificationDeletedCommand.cs | 4 ++-- .../Commands/MarkNotificationReadCommand.cs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Core/NotificationCenter/Commands/MarkNotificationDeletedCommand.cs b/src/Core/NotificationCenter/Commands/MarkNotificationDeletedCommand.cs index fed9fd0469..2ca7aa9051 100644 --- a/src/Core/NotificationCenter/Commands/MarkNotificationDeletedCommand.cs +++ b/src/Core/NotificationCenter/Commands/MarkNotificationDeletedCommand.cs @@ -49,11 +49,11 @@ public class MarkNotificationDeletedCommand : IMarkNotificationDeletedCommand if (notificationStatus == null) { - notificationStatus = new NotificationStatus() + notificationStatus = new NotificationStatus { NotificationId = notificationId, UserId = _currentContext.UserId.Value, - DeletedDate = DateTime.Now + DeletedDate = DateTime.UtcNow }; await _authorizationService.AuthorizeOrThrowAsync(_currentContext.HttpContext.User, notificationStatus, diff --git a/src/Core/NotificationCenter/Commands/MarkNotificationReadCommand.cs b/src/Core/NotificationCenter/Commands/MarkNotificationReadCommand.cs index 9368660501..400e44463a 100644 --- a/src/Core/NotificationCenter/Commands/MarkNotificationReadCommand.cs +++ b/src/Core/NotificationCenter/Commands/MarkNotificationReadCommand.cs @@ -49,11 +49,11 @@ public class MarkNotificationReadCommand : IMarkNotificationReadCommand if (notificationStatus == null) { - notificationStatus = new NotificationStatus() + notificationStatus = new NotificationStatus { NotificationId = notificationId, UserId = _currentContext.UserId.Value, - ReadDate = DateTime.Now + ReadDate = DateTime.UtcNow }; await _authorizationService.AuthorizeOrThrowAsync(_currentContext.HttpContext.User, notificationStatus,