Skip to content

Commit

Permalink
Regional time calls changed to UTC for date display (#49)
Browse files Browse the repository at this point in the history
Mission dates in selection menu display a day off in all time zones earlier than UTC due to improper date conversion. See below for more details: https://discord.com/channels/858402673066115102/871034165271855125/1279682140203913320
  • Loading branch information
Exirium authored Sep 9, 2024
1 parent 9b0d865 commit 644fb1d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion static/scripts/ocap.js
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ function armaToLatLng (coords) {

// Returns date object as little endian (day, month, year) string
function dateToLittleEndianString (date) {
return (date.getDate() + "/" + (date.getMonth() + 1) + "/" + date.getFullYear());
return (date.getUTCDate() + "/" + (date.getUTCMonth() + 1) + "/" + date.getUTCFullYear());
}

function test () {
Expand Down

0 comments on commit 644fb1d

Please sign in to comment.