cforms2 icon indicating copy to clipboard operation
cforms2 copied to clipboard

Fix timezone handling for form start/end datetime fields

Open wotis opened this issue 4 months ago • 1 comments

  • Fix 2-hour offset bug where forms disabled too early (UTC vs local time)
  • Properly use WordPress timezone settings in FormSettings::convertFormatToTime()
  • Add timezone conversion for display logic in cforms-options.php
  • Fix datetime storage with correct timezone handling in lib_options_sub.php
  • Resolve DateTime namespace conflicts by adding backslash prefix
  • Tested with MESZ/CET and manual UTC offset configurations

Fixes issue where forms with end dates would deactivate at 22:00 instead of 00:00 when WordPress timezone was set to Europe/Berlin (MESZ).

wotis avatar Sep 22 '25 08:09 wotis

Thanks for all the changes. I will need some time to review them. Please adjust the PR's title to represent what is in it.

bgermann avatar Sep 23 '25 23:09 bgermann