Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Recently upgraded to PHP5.3 and started seeing errors:
warning: timezone_open() [function.timezone-open]: Unknown or bad timezone (UTC) in /home/truhome/public_html/new/sites/all/modules/calendar/calendar.module on line 614.
warning: date_timezone_set() expects parameter 2 to be DateTimeZone, boolean given in /home/truhome/public_html/new/sites/all/modules/calendar/calendar.module on line 614.
warning: timezone_open() [function.timezone-open]: Unknown or bad timezone (UTC) in /home/truhome/public_html/new/sites/all/modules/calendar/calendar.module on line 614.
warning: date_timezone_set() expects parameter 2 to be DateTimeZone, boolean given in /home/truhome/public_html/new/sites/all/modules/calendar/calendar.module on line 614.
No idea why this is happening. Browsing to line 615 of calendar.module we see this:
// Translate the view min and max dates to UTC values
// so we can compare UTC dates to the view range.
$min_utc = drupal_clone($view->date_info->min_date);
date_timezone_set($min_utc, timezone_open('UTC'));
$max_utc = drupal_clone($view->date_info->max_date);
date_timezone_set($max_utc, timezone_open('UTC'));
...
Fair enough, looks like UTC is hard-coded. Changing the 'UTC' string to a different timezone (say, "America/Vancouver") makes all those errors go away.
I suspect PHP is at fault. Ideas?
Comments
Comment #1
Neslee Canil PintoThe D6 branch is no longer supported so we're closing this issue. If you think this issue still exists in D7 you can open a new one.