The module worked great with "Site's time zone", but it generated several PHP errors for "Date's time zone" that also resulted in a validation error that emptied the value from the form after it was redrawn.

    * Warning: timezone_open(): Unknown or bad timezone (A) in date_combo_validate() (line 508 of .../modules/misc/date/date/date_elements.inc).
    * Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, boolean given in date_combo_validate() (line 508 of .../modules/misc/date/date/date_elements.inc).
    * Warning: timezone_open(): Unknown or bad timezone (A) in date_combo_validate() (line 509 of .../modules/misc/date/date/date_elements.inc).
    * Warning: date_timezone_set() expects parameter 2 to be DateTimeZone, boolean given in date_combo_validate() (line 509 of .../modules/misc/date/date/date_elements.inc).
    * There are errors in <field name>:
          o The From date is invalid.
          o The To date is invalid.

Comments

stackpr’s picture

Status: Active » Needs review
StatusFileSize
new590 bytes

Attached is a patch that addresses this issue the same way the rrule field is handled currently.

joachim’s picture

Thanks for reporting this, and also making a patch!

The patch works, though I think it might be better to play safe and just render everything that's left in the form -- so we avoid surprises like this in future.

Could you test this patch please?

stackpr’s picture

Status: Needs review » Reviewed & tested by the community

Works great.

joachim’s picture

Status: Reviewed & tested by the community » Fixed

Thanks!

Issue #1108022 by witti, joachim: Fixed errors on datefields with a timezone.

Status: Fixed » Closed (fixed)

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