Timezone selection not working properly

Created on 19 June 2019, over 5 years ago
Updated 16 February 2023, almost 2 years ago

Context:
I'm trying to import events from a google calendar to an 'events' node type. My site is set to Detroit timezone.

What is happening:
When importing calendar entries from a google calendars .ics file, the datetime fields are in the following format [YYYY][MM][DD]T[HH][MM][SS]Z. I'm not 100% sure, but I think the 'Z' is the timezone code for Zulu, which is equivalent to +0000 UTC.

Anyhow, when those entries are imported, regardless of the timezone I've selected in the feeds mappings, they are entered as though they are an accurate local time, and are accordingly time-shifted +4 hours. This leads the datetime 20190619T110000Z to be entered as 2019-06-19T15:00:00 in the database, and then for that time to be shifted back -4 hours when displayed in a view.

What I would expect to happen:
In the mappings, the timezone select list says, "This value will only be used if the timezone is missing." I would guess that "Z" is not properly recognized as Zulu time (+0 UTC), but is also not recognized as "no timezone" leading it to this shadowy middle ground where the parser just treats it as a normal time.

Perhaps something else that could be useful is an option to force a specific timezone, regardless of if one is already provided.

πŸ› Bug report
Status

RTBC

Version

1.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States andy-blum Ohio, USA

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024