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

[5.x] Allow different timezone from app timezone for displaying date+time in CP and Antlers #11388

Open
wants to merge 1 commit into
base: 5.x
Choose a base branch
from

Conversation

florianbrinkmann
Copy link
Contributor

I already had a PR open for this (#10166) but accidentally deleted my fork 🫠 So here is a copy of the description:

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant