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
Change page date/times to display in local time based on style timezone setting #3503
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, I don't think this is correct. While the default time zone for the server is UTC, it doesn't have to be. This is configured by the settings.TIME_ZONE
setting. If this is changed, I'm pretty sure the Msg
objects (page.date_created
) will be set in that time zone, and then this solution will be wrong.
What should be done here is instead to convert from the server TIME_ZONE
(also if it's not UTC) to the player's time zone.
When looking at the value of However, I think the better solution is to convert the time to the local time zone if the two time zones aren't the same, whch is probably how I should have done it in the first place. This way it doesn't matter what the time zones of the server or Here's an example of the UTC times in the messages (this is with the current behaviour):
page.date_created:
page.date_created:
For context, the UTC time according to https://www.timeanddate.com/worldclock/timezone/utc was: I'm not sure if this is related, but |
So, I discovered something interesting while poking at this, and I believe the current timezone settings are actually bugged. 😆 I'm going to file an issue since it got a bit complicated but I'll reference it here. |
OK, I'll park this and #3504 until you've go that sorted. |
Brief overview of PR changes/additions
The
page
command currently shows page date/times in UTC. This changes the date/times to the local time zone based on the setting instyle
.Motivation for adding to Evennia
Show local time for pages.
Other info
UTC:
Local time: