Skip to content

Commit 3cf9fcb

Browse files
committed
Use utc time
1 parent e6bf5f5 commit 3cf9fcb

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Common/Constants/HardLimits.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,7 @@ public static class HardLimits
5252

5353
// Don't allow any firmware prior to 2024.
5454
// Ridiculous edgecase: environment reports year at or prior to 2024, revert to 10 year limit just to be on the safe side
55-
public static readonly TimeSpan FirmwareMaxUptime = DateTime.Now.Year <= 2024 ? TimeSpan.FromDays(365 * 10) : DateTime.Now - new DateTime(2024, 1, 1);
55+
public static readonly TimeSpan FirmwareMaxUptime = DateTime.UtcNow.Year <= 2024 ?
56+
TimeSpan.FromDays(365 * 10) :
57+
DateTime.UtcNow - new DateTime(2024, 1, 1, 0, 0, 0, DateTimeKind.Utc);
5658
}

0 commit comments

Comments
 (0)