- Issue created by @rkoller
Follow up for an issue that was identified during 📌 Drupal Usability Meeting 2024-11-15 Active and initially raised in 🐛 Better handling of timezones for relative default date + times Active .
It is currently not apparent that a timezone is set per default for the Relative default value
field,
🐛
Better handling of timezones for relative default date + times
Active
is changing that default timezone to UTC, nor is the time zone that is applied communicated in the title or the description of the Relative default value
field. In consequence it is not necessarily clear to the user that a time zone could be entered in the first place and that a certain syntax has to be met. How things are communicated to the user should be covered in another issue (I’ll add a link after i've created the other follow up issue), the issue here is about the behavior of the date field in regard of the various different ways time zones could be entered. The problems we’ve noticed are:
The relative date value entered is invalid.
. The relative date has to be for example +2 Saturday 13:00 America/New_York
, any deviation for the timezone like for example america/new_york
, America / New_York
, or America/New York
causes the validation error. Plus based on the error message and/or the field description it is not clear at all which part of the entered relative date value +2 Saturday 13:00 America/New York
is invalid.GMT
or UTC
time zone instead, there is no form validation error at all, no matter if you are using for example gmt+5
, Gmt+5
, GMT+5
, utc+5
, Utc+5
, or UTC+5
. Problem is, only for GMT+5
and UTC+5
the default relative time is shown on the corresponding node edit form of the content type, for any other case variant the date and time field remains empty.admin/structure/types/manage/article/fields
+2 Saturday 13:00 America/New York
, and submit.+2 Saturday 13:00 gmt+5
and go to node/add/article
, you will notice an empty date and time field, missing the set relative default date value.
If technical possible make the form validation more forgiving. In case spaces and/or different cases are used on the time zone of choice it should be still recognized, no form validation error should turn up, and ideally the time zone should be adjusted to the correct syntax - otherwise provide at least a more helpful and specific error message for the form validation error. If the adjustment to the correct syntax would be possible that would possibly solve the problem of the empty date and time fields on the node edit form as well - otherwise make sure that the date and time fields remain populated with the set relative default value nevertheless.