Created on 3 January 2018, over 6 years ago
Updated 16 November 2023, 7 months ago

Timezone handling is not implemented and mostly derived from parent classes in both widget and formatter. This does not mean it is present or if it even works. This issue is to test the timezone support and fix the gaps.

πŸ“Œ Task
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡¨πŸ‡¦Canada hussainweb

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡¨πŸ‡¦Canada hussainweb

    A fresh test with Drupal 9 and 10 showed that timezones are not handled correctly. When saving a "Date only" field, the actual date written to the database is a day earlier (as I am in Eastern timezone and Drupal converts the date to UTC). For example, today is 4th Jumadil Ula and 16th November; saving this date will store 7 PM 15th November. The time is discarded and only 15th November is stored. On the next load of the edit page, it will convert 15th November to 3rd Jumadil Ula. Saving this will store 14th November and the drift repeats.

    The problem is that the date form element we have handles the date conversion and it returns a string after formatting the timestamp with Drupal API. Of course, the timezone conversion happens here. Therefore, the date form element (TaarikhDate.php) should set the timezone before returning the formatted string.

  • @hussainweb opened merge request.
  • Status changed to Fixed 7 months ago
  • πŸ‡¨πŸ‡¦Canada hussainweb

    Merged

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024