-
-
Notifications
You must be signed in to change notification settings - Fork 518
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
[5.x] Allow different timezone from app timezone for displaying date+time in CP and Antlers #10166
base: 5.x
Are you sure you want to change the base?
Conversation
This could be great. I wonder if the client timezone should be a per site config option in sites.yaml so this could work for multisite as well. |
I like the idea! Will check that out |
Also a user account timezone setting/override would be really useful, for when you have CP users in different timezones. |
I think there should be an app config like you've done, and then a user preference that overrides it. I wouldn't go as far as making different ones per-site. |
This is a conflicting effort with #8636. We'll need to figure out the approach and consolidate them. |
Fair enough. We can probably already do that with a custom site attribute and some Antlers logic. |
User preferences sounds good, but that preference would have to be limited to the CP part, so not in the |
Laravel encourages to not change the default
UTC
timezone in the config (https://laravel.com/docs/11.x/eloquent-mutators#date-casting-and-timezones), to prevent issues when comparing dates etc.That said, I thought about how we could have both: the UTC timezone for all stored date/time values, but the values in the CP being displayed like in another timezone, for example
Europe/Berlin
, so if an editor in Germany tries to publish an entry immediately which has date+time enabled, it gets published right away and not when the UTC time is at the current point (so in one or two hours, depending on Daylight saving time)I guess I did not find all places where that check and conversion should happen, so if you know of other places, please let me know :)
In general it should not change anything for existing and new installs, except the config value is set.