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.
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');
Comment | File | Size | Author |
---|---|---|---|
#1 | gcal_freebusy_funct_offset_fix-2139765-2.patch | 567 bytes | Bober |
Comments
Comment #1
Bober CreditAttribution: Bober as a volunteer commentedCreated a patch as I hit the bug when using gcal module and Europe/Kiev timezone - the time was wrong.