Here is a slightly updated version of the patch. It now achieves three of the four goals:
- On the node-edit or webform-edit screen, it successfully takes an input datetime in the user's timezone and saves it to the DB in UTC.
- When rendering the node-edit or webform-edit screen, it successfully displays the previously entered date in the user's timezone.
- It correctly figures out whether the webform is currently open or closed.
BUT:
- The patch still does nothing about previously entered open & close datetimes; they end up off by the difference between UTC & the site's timezone.
Update: This patch here β https://www.drupal.org/project/webform/issues/3258050#comment-14363737 π Scheduled webform dates not converted to UTC Closed: won't fix β does install against webform 6.2.x-dev, and it partly solves the issue:
- On the node-edit or webform-edit screen, it successfully takes an input datetime in the user's timezone and saves it to the DB in UTC.
- When rendering the node-edit or webform-edit screen, it successfully displays the previously entered date in the user's timezone.
BUT:
- When figuring out whether the webform is currently open or closed, it's all screwed up. The patched code takes the DB value, which it should interpret as being in UTC, and instead interprets it as if it were in the user's timezone.
- The patch also does nothing about previously entered open & close datetimes; they end up off by the difference between UTC & the site's timezone.
@cilefen β I'm running Webform 6.2.7 , and for some reason, I couldn't get composer to to install the patch from this merge request:
https://git.drupalcode.org/project/webform/-/merge_requests/365/diffs
berkeleyjon β created an issue.
BerkeleyJon β created an issue.
PHP 8.1.18 here, too.
BerkeleyJon β created an issue.