Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong time zone for best scores #17

Open
ghost opened this issue Sep 2, 2021 · 4 comments · May be fixed by #46
Open

Wrong time zone for best scores #17

ghost opened this issue Sep 2, 2021 · 4 comments · May be fixed by #46
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@ghost
Copy link

ghost commented Sep 2, 2021

Time is in future

On admin panel it is correct though

@ghost ghost added bug Something isn't working help wanted Extra attention is needed labels Sep 2, 2021
@ghost ghost assigned varkaria Sep 2, 2021
@Sensokaku
Copy link

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

@JKBGL
Copy link
Collaborator

JKBGL commented Oct 13, 2021

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.

@ghost
Copy link
Author

ghost commented Oct 13, 2021

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.

@cmyui
Copy link
Collaborator

cmyui commented Oct 13, 2021

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

@g1-1-1 g1-1-1 linked a pull request Mar 29, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants