in the function "gcal_freebusy" may be replace ..?

  $origin_dtz = new DateTimeZone('UTC');
  $remote_dtz = new DateTimeZone($params['TimeZone']);
  $origin_dt = new DateTime("now", $origin_dtz);
  $remote_dt = new DateTime("now", $remote_dtz);
  $offset = $origin_dtz->getOffset($origin_dt) - $remote_dtz->getOffset($remote_dt);

  $timestamp = strtotime($start);
  $start = date('Y-m-d\TH:i:s', $timestamp);
  $start .= ($offset < 0 ? '-' . gmdate("H:i", $offset) : '+' . gmdate("H:i", $offset));
  $origin_dtz = new DateTimeZone('UTC');
  $remote_dtz = new DateTimeZone($params['TimeZone']);
  $origin_dt = new DateTime("now", $origin_dtz);
  $remote_dt = new DateTime("now", $remote_dtz);
  $offset = $origin_dtz->getOffset($origin_dt) - $remote_dtz->getOffset($remote_dt);

  $timestamp = strtotime($start);
  $start = date('Y-m-d\TH:i:s', $timestamp);
  $start .= $remote_dt->format('P');
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Bober’s picture

Version: 7.x-1.0-rc1 » 7.x-1.x-dev
FileSize
567 bytes

Created a patch as I hit the bug when using gcal module and Europe/Kiev timezone - the time was wrong.