Home › Forums › Calendar Products › Event Aggregator › Import XML reading UTC timezone instead of Los Angeles
- This topic has 8 replies, 2 voices, and was last updated 5 years, 11 months ago by Scott.
-
AuthorPosts
-
December 7, 2017 at 11:08 am #1400589ScottParticipant
Hi,
My site is importing several event feeds from Eventlink and the individual events get set to the timezone of UTC which they should not. The events are actually Los Angeles (PST) timezone. (note – this is UTC -8 or UTC -7 depending on the time of year). I looked at the code of one of the .ics files and I think I see the issue but not sure what to do about it.
BEGIN:VCALENDAR
PRODID:-//Google Inc//Google Calendar 70.9054//EN
VERSION:2.0
CALSCALE:GREGORIAN
METHOD:PUBLISH
X-WR-CALNAME:Army and Navy Academy
X-WR-TIMEZONE:UTC
BEGIN:VTIMEZONE
TZID:America/Los_Angeles
X-LIC-LOCATION:America/Los_Angeles
BEGIN:DAYLIGHT
TZOFFSETFROM:-0800
TZOFFSETTO:-0700
TZNAME:PDT
DTSTART:19700308T020000
RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
END:DAYLIGHT
BEGIN:STANDARD
TZOFFSETFROM:-0700
TZOFFSETTO:-0800
TZNAME:PST
DTSTART:19701101T020000
RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
END:STANDARD
END:VTIMEZONE
BEGIN:VEVENT
As you can see in the code, the X-WR-TIMEZONE is set to UTC which I believe is what Events Calendar is using as the event timezone during import. What the plugin is failing to do is understand that the timezone is actually -0800 or -0700 (depending on daylight savings) which is listed below it in the TZOFFSETFROM and TZOFFSETTO.
There are also several other spots in the code that show that this should be PDT if you look at the items for TZID, X-LIC-LOCATION, or TZNAME.
3 attached screenshots:
1) screenshot of an imported event on our calendar that shows the import timezone as UTC.
2) screenshot of Event Calendar timezone settings (Events > Settings > General)
3) screenshot of WordPress timezone is set to Los Angeles for this site under Settings > GeneralLastly, here is the .ics feed I referenced above:
https://calendar.google.com/calendar/ical/b0bkgetcceub0ijrvqcns05q3im8dagv%40import.calendar.google.com/public/basic.icsDecember 11, 2017 at 4:16 am #1402709AndrasKeymasterHello Scott,
Thanks for reaching out!
I tested this and can confirm this is happening.
I have opened a bugticket so our developers can take a look at the issue.
I am going to set the status of this ticket to “pending fix” and we will update it once the fix is released.
If you have any new questions or issues please create a new ticket and we’ll help you out.
Thanks and cheers,
AndrasDecember 15, 2017 at 2:05 pm #1406791ScottParticipantHi, Any update on this issue? We are anxious to get our winter sports events up on our calendar, but cannot do so because of this issue showing the wrong time. Your help is appreciated.
December 18, 2017 at 1:59 pm #1408230AndrasKeymasterHello Scott,
Thanks for pinging me.
There is no update for this bug yet. When the issue was reported and I opened the bugticket our team was already well into the development of the upcoming maintenance release, which will be the last one this year, so it did not make it into that one.
After this MR is released we will start scoping the bugs for the next one, but that will likely only happen in the new year, so I need to ask for a bit of patience from you. Thanks!
Happy Holidays,
AndrasJanuary 8, 2018 at 3:43 pm #1420928ScottParticipantOne additional note to this issue – We have noticed that when our iCalendar feed is imported if the event is an “All Day” event then the above issue happens where the event is converted to UTC time by plugin. If the event has a specific time (10:30am-11:30am for example) then the time is kept in Los Angeles, PST.
January 9, 2018 at 12:39 pm #1421752AndrasKeymasterHi Scott,
Thanks for sharing that extra info.
I ran some further tests and if the time is defined like this:
DTSTART;TZID=America/Los_Angeles:20170807T180000
Then the timezone will be taken into account. Otherwise it is skipped even though it is defined at the beginning.
We’ll take a look at it.
Andras
April 12, 2018 at 6:22 am #1505391AndrasKeymasterHi Scott,
Thanks for your patience so far.
A couple of devs went through the issue and we had a discussion about this. Here is the result.
1) the calendar in question (https://calendar.google.com/calendar/ical/b0bkgetcceub0ijrvqcns05q3im8dagv%40import.calendar.google.com/public/basic.ics) defines a timezone for the whole calendar using the
X-WR-TIMEZONE
attribute:X-WR-TIMEZONE:UTC
That timezone is “UTC”.
2) The calendar then defines a timezone identified with “America/Los_Angeles” in a “VTIMEZONE” block; contrary to popular belief this is not the calendar timezone but just the data about a timezone one or more event in the feed might use.
3) Where the file does not specify that the “America/Los_Angeles” timezone should be used then the calendar-wide one, “UTC”, will be used; this applies, for example, to the “ACT Tests (on campus)” event.
The event DTSTART and DTEND attribute are not, in fact, specifying a TZID; importing this event will correctly assign it the “UTC” timezone.
4) There are two events in the feed that do use the “America/Los_Angeles” timezone, e.g. the “REC HALL OPEN” one; preview from the 2017-08-01 date to get it.
Importing any instance of the event will correctly set the “America/Los_Angeles” timezone on them.
The event does, in fact, use it in the date specification.All in all, it looks like that the import works correctly.
If you would like to have more info on the VTIMEZONE specification to understand what it actually is then visit https://www.kanzaki.com/docs/ical/tzid-p.html and https://www.kanzaki.com/docs/ical/vtimezone.html.
Note that we are still having discussions about the all-day events and their handlings.
Hope this gives a bit of clarity.
Cheers,
AndrasApril 15, 2018 at 8:48 pm #1507810ScottParticipantThank you for following up on this. I have informed my client of your
feedback. Since the issue was from a while back, we have since found a way
to circumvent their issue. I appreciate the follow up.Scott
April 16, 2018 at 3:45 am #1507944AndrasKeymasterHi Scott,
Thanks for getting back to me and sorry it took so long.
Would you mind sharing the workaround you used? Might be helpful for other users in the community as well.
If there is nothing else I can help you with, is it OK if I close this topic as resolved?
Cheers,
AndrasMay 8, 2018 at 9:35 am #1525347Support DroidKeymasterHey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.
Thanks so much!
The Events Calendar Support Team -
AuthorPosts
- The topic ‘Import XML reading UTC timezone instead of Los Angeles’ is closed to new replies.