Date field timezone support: no way to reasonably set event times #5635
Replies: 2 comments 9 replies
-
Moved this over to a discussion as it's a feature request! We can gather feed for this here |
Beta Was this translation helpful? Give feedback.
-
Oh man, this date field timezone issue has been driving me nuts for the past two weeks. Having the admins of a website scattered throughout the world, it's impossible to handle this issue easily. The dates are set for events that are also international and are in different timezones, so this issue is on a whole another level (figure out the editor timezone, adjust while saving to negate the timezone difference and then also get a hook that adjusts the time when another editor is viewing the field in another timezone. This is 100% a bug, because outside of the people who actually live in UTC+0, this field becomes completely unpredictable. And a simple solution to this would simply be setting the default timezone that the date is saved in the db with. That's it. |
Beta Was this translation helpful? Give feedback.
-
Link to reproduction
No response
Describe the Bug
Scenario:
I suggest there's effectively no reasonable way to represent this in payload. To display this on the frontend I believe you must set a timezone on this event (perhaps there's an argument that this could be business logic gleaned from an event location or that the frontend should always display the event time in the browsers local timezone but I'd say those are both pretty unreaonsable).
The admin experience here requires some extremely counter intuitive behavior to get this correct. As an admin I must understand that whatever date I enter here will be stored in UTC, despite what timezone I select in the timezone dropdown. In order to get this to show up correctly the admin has to convert their "browser" time to UTC and enter an incorrect event time, in this case they'd have to enter the event time as April 3rd at 10pm, but set the timezone drop down to display MSK. This gets even more confusing with multiple admins using this across timezones, as they will have different views of the record.
This of course is ignoring that the browser timezone could be inaccurate for any variety of reasons.
To Reproduce
n/a
Payload Version
n/a
Adapters and Plugins
No response
Beta Was this translation helpful? Give feedback.
All reactions