guweb icon indicating copy to clipboard operation
guweb copied to clipboard

Wrong time zone for best scores

Open ghost opened this issue 3 years ago • 4 comments

Time is in future

On admin panel it is correct though

ghost avatar Sep 02 '21 06:09 ghost

Not sure if this is how it's meant to be but when i use <% timeago.format(map.play_time + ' UTC-6') %> It show's the correct time ago for my best and recent scores but i'm sure there's a better fix somewhere

Sensokaku avatar Oct 13 '21 05:10 Sensokaku

Not sure if this is how it's meant to be but when i use <% timeago.format(map.play_time + ' UTC-6') %> It show's the correct time ago for my best and recent scores but i'm sure there's a better fix somewhere

This is most likely gulag's fault, because it is the one that manages score timestamps on submission. It is unlikely to be fixable for everyone until cmyui adds a timezone configuration.

JKBGL avatar Oct 13 '21 08:10 JKBGL

Not sure if this is how it's meant to be but when i use <% timeago.format(map.play_time + ' UTC-6') %> It show's the correct time ago for my best and recent scores but i'm sure there's a better fix somewhere

This is most likely gulag's fault, because it is the one that manages score timestamps on submission. It is unlikely to be fixable for everyone until cmyui adds a timezone configuration.

API should be providing timestamps in UTC; it's up to the frontend to format it for the browser's locale.

ghost avatar Oct 13 '21 17:10 ghost

API should be providing timestamps in UTC; it's up to the frontend to format it for the browser's locale.

Yep, this should be the intended behavior.

This would have been one of the first things I wrote in gulag, so it may be using timezones inappropriately either when saving to the db or serving through the api. I would check now but I'm at work and don't have much spare time. xP perhaps someone will beat me to it

cmyui avatar Oct 13 '21 17:10 cmyui