Skip to content

Commit

Permalink
Fix timezone issue with time2text() (OpenDreamProject#1509)
Browse files Browse the repository at this point in the history
  • Loading branch information
Cyberboss authored Oct 16, 2023
1 parent 11a64a5 commit 5be739d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion OpenDreamRuntime/Procs/Native/DreamProcNativeRoot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 5be739d

Please sign in to comment.