When user configures Timezone Override field on Custom Format settings this information is not being used. If you check the URL it'll always UTC.

Example:
1) CMS - Timezone Override: America/Los Angeles
2) CMS - User creates an event starting on July 18th - 4am
3) Brazilian user clicks on add to calendar button (Google Calendar)

Result:
Event is being added to the calendar with start date: July 18th - 1am

Expected Result:
Event should be added to calendar with start date: July 18th - 8am

I'm suggesting a patch to solve this issue. Please, review it.

Thanks.

Comments

carolpettirossi created an issue. See original summary.

carolpettirossi’s picture

gg24’s picture

Assigned: Unassigned » gg24
sawtell’s picture

I don't know if this is related or warrants it's own ticket, but the DrupalDateTime objects are using the UTC timezone regardless of the field or global configuration.

$date = new DrupalDateTime(preg_replace('/T/', ' ', $values[$index]['value']), 'UTC');
if (!empty($values[$index]['end_value']) && isset($values[$index]['end_value'])) {
  $end_date = new DrupalDateTime(preg_replace('/T/', ' ', $values[$index]['end_value']), 'UTC');
}

This is causing issues for us and the resolution is to remove the timezone parameter.

sawtell’s picture

StatusFileSize
new1.65 KB

Adding patch incase it helps others

sawtell’s picture

StatusFileSize
new1.58 KB

The last patch didn't work for me so I've updated it to use the correct timezone throughout.

sawtell’s picture

StatusFileSize
new1.58 KB

Eugh... last one I promise.

purushotam.rai’s picture

Status: Active » Reviewed & tested by the community

Thanks for your efforts guys.

It seems like Drupal is taking care of timezones well, however in case it is missing I see no harm in applying this patch in the module.

  • purushotam.rai committed a63683c on 8.x-2.x authored by ls206
    Issue #2895762 by ls206, carolpettirossi, gg24, purushotam.rai: Timezone...
purushotam.rai’s picture

purushotam.rai’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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

austin_brian’s picture

Confirming that this patch in #7 fixes the issue on my site.