diff --git a/SS14.Admin/Helpers/BanHelper.cs b/SS14.Admin/Helpers/BanHelper.cs index 37fdc9b..c8f57c9 100644 --- a/SS14.Admin/Helpers/BanHelper.cs +++ b/SS14.Admin/Helpers/BanHelper.cs @@ -69,7 +69,7 @@ private IQueryable> CreateBanJoin(DbSet(IBanCommon b) where TUnban : IUnbanCommon { - return (b.ExpirationTime == null || b.ExpirationTime > DateTime.Now) && b.Unban == null; + return (b.ExpirationTime == null || b.ExpirationTime > DateTime.UtcNow) && b.Unban == null; } [Pure] diff --git a/SS14.Admin/Pages/Bans/Hits.cshtml b/SS14.Admin/Pages/Bans/Hits.cshtml index b15fabb..05be267 100644 --- a/SS14.Admin/Pages/Bans/Hits.cshtml +++ b/SS14.Admin/Pages/Bans/Hits.cshtml @@ -32,7 +32,7 @@
Unbanned: @unbanned.UnbanTime.ToString("yyyy-MM-dd HH:mm:ss") by @Model.Ban.UnbanAdmin?.LastSeenUserName } - else if (Model.Ban.Ban.ExpirationTime < DateTime.Now) + else if (Model.Ban.Ban.ExpirationTime < DateTime.UtcNow) {
Expired diff --git a/SS14.Admin/Pages/Bans/Index.cshtml.cs b/SS14.Admin/Pages/Bans/Index.cshtml.cs index 2632452..88f4a19 100644 --- a/SS14.Admin/Pages/Bans/Index.cshtml.cs +++ b/SS14.Admin/Pages/Bans/Index.cshtml.cs @@ -40,8 +40,8 @@ public async Task OnGetAsync( bans = show switch { ShowFilter.Active => bans.Where(b => - b.Ban.Unban == null && (b.Ban.ExpirationTime == null || b.Ban.ExpirationTime > DateTime.Now)), - ShowFilter.Expired => bans.Where(b => b.Ban.Unban != null || b.Ban.ExpirationTime < DateTime.Now), + b.Ban.Unban == null && (b.Ban.ExpirationTime == null || b.Ban.ExpirationTime > DateTime.UtcNow)), + ShowFilter.Expired => bans.Where(b => b.Ban.Unban != null || b.Ban.ExpirationTime < DateTime.UtcNow), _ => bans }; diff --git a/SS14.Admin/Pages/Logs/Index.cshtml.cs b/SS14.Admin/Pages/Logs/Index.cshtml.cs index 2a5086a..949d1cb 100644 --- a/SS14.Admin/Pages/Logs/Index.cshtml.cs +++ b/SS14.Admin/Pages/Logs/Index.cshtml.cs @@ -17,10 +17,10 @@ public class LogsIndexModel : PageModel public Dictionary AllRouteData { get; } = new(); [BindProperty(SupportsGet = true)] - public DateTime FromDate { get; set; } = DateTime.Now.Subtract(TimeSpan.FromDays(1)); + public DateTime FromDate { get; set; } = DateTime.UtcNow.Subtract(TimeSpan.FromDays(1)); [BindProperty(SupportsGet = true)] - public DateTime ToDate { get; set; } = DateTime.Now; + public DateTime ToDate { get; set; } = DateTime.UtcNow; [BindProperty(SupportsGet = true)] public OrderColumn Sort { get; set; } = OrderColumn.Date; diff --git a/SS14.Admin/Pages/RoleBans/Index.cshtml.cs b/SS14.Admin/Pages/RoleBans/Index.cshtml.cs index f8f4f7e..38cc18f 100644 --- a/SS14.Admin/Pages/RoleBans/Index.cshtml.cs +++ b/SS14.Admin/Pages/RoleBans/Index.cshtml.cs @@ -40,8 +40,8 @@ public async Task OnGetAsync( bans = show switch { ShowFilter.Active => bans.Where(b => - b.Ban.Unban == null && (b.Ban.ExpirationTime == null || b.Ban.ExpirationTime > DateTime.Now)), - ShowFilter.Expired => bans.Where(b => b.Ban.Unban != null || b.Ban.ExpirationTime < DateTime.Now), + b.Ban.Unban == null && (b.Ban.ExpirationTime == null || b.Ban.ExpirationTime > DateTime.UtcNow)), + ShowFilter.Expired => bans.Where(b => b.Ban.Unban != null || b.Ban.ExpirationTime < DateTime.UtcNow), _ => bans }; diff --git a/SS14.Admin/Pages/Tables/BansTable.cshtml b/SS14.Admin/Pages/Tables/BansTable.cshtml index 45b358e..4ce355f 100644 --- a/SS14.Admin/Pages/Tables/BansTable.cshtml +++ b/SS14.Admin/Pages/Tables/BansTable.cshtml @@ -87,7 +87,7 @@
Unbanned: @time.ToString("yyyy-MM-dd HH:mm:ss") by @admin } - else if (ban.Expires < DateTime.Now) + else if (ban.Expires < DateTime.UtcNow) {
Expired diff --git a/SS14.Admin/Pages/Tables/RoleBansTable.cshtml b/SS14.Admin/Pages/Tables/RoleBansTable.cshtml index d0fc11a..332ecfe 100644 --- a/SS14.Admin/Pages/Tables/RoleBansTable.cshtml +++ b/SS14.Admin/Pages/Tables/RoleBansTable.cshtml @@ -89,7 +89,7 @@
Unbanned: @time.ToString("yyyy-MM-dd HH:mm:ss") by @admin } - else if (ban.Expires < DateTime.Now) + else if (ban.Expires < DateTime.UtcNow) {
Expired