From 5be739d6b0e63c0f05fc767c5a6593e404d68819 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Mon, 16 Oct 2023 01:05:54 -0400 Subject: [PATCH] Fix timezone issue with time2text() (#1509) --- OpenDreamRuntime/Procs/Native/DreamProcNativeRoot.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenDreamRuntime/Procs/Native/DreamProcNativeRoot.cs b/OpenDreamRuntime/Procs/Native/DreamProcNativeRoot.cs index 3e003f5089..6454242e94 100644 --- a/OpenDreamRuntime/Procs/Native/DreamProcNativeRoot.cs +++ b/OpenDreamRuntime/Procs/Native/DreamProcNativeRoot.cs @@ -2572,7 +2572,7 @@ public static DreamValue NativeProc_time2text(NativeProc.Bundle bundle, DreamObj // The DM reference says this is 0-864000. That's wrong, it's actually a 7-day range instead of 1 if (timestamp >= 0 && timestamp < 864000*7) { - ticks += DateTime.Today.Ticks; + ticks += new DateTime(DateTime.UtcNow.Year, DateTime.UtcNow.Month, DateTime.UtcNow.Day).Ticks; } else { // Offset from January 1st, 2020 ticks += new DateTime(2000, 1, 1).Ticks;