Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timezone handling issue #12

Open
debackel opened this Issue Feb 25, 2018 · 6 comments

Comments

Projects
None yet
5 participants
@debackel
Copy link

debackel commented Feb 25, 2018

I think there is an issue when handling timezones.
I have imported a calendar generated from gmail, with a timezone of Europe/Brussels (calendar and events).
An event was created to start at 8 AM (local time) on 30 MAR 2018.
When I display the event DTSTART, it show the time with a +01:00 time zone.
But at that time of the year, the timezone in Belgium should be +02:00.

Using the method "events" of class "icalevents" indicates that you need to biais the "start" parameter to match the event.

See the attached files:
1/ The exported google calendar
2/ the code used for highlighting the issue.
3/ The output.

MyCal2.txt
essai2.txt
output.txt

@lanewinfield

This comment has been minimized.

Copy link

lanewinfield commented May 7, 2018

I'm also definitely showing a timezone issue. Looks like I need to manually adjust my queries to match my calendar's timezone.

@jc1518

This comment has been minimized.

Copy link

jc1518 commented Jun 7, 2018

+1. I have the timezone handling issue too.

@Hultner

This comment has been minimized.

Copy link

Hultner commented Jan 21, 2019

I too had issues with timezones.

It seems to always fallback to UTC and completely ignore TZID from DTSTART and DTEND, if I look into my calendar-files or open them i Calendar.app/Outlook/gCal the timezone is correct.

@Hultner

This comment has been minimized.

Copy link

Hultner commented Jan 21, 2019

@irgangla I fixed my timezone issues by patching the normalize function. Above problem is caused by the library overwriting the tzid from DTSTART/DTEND (which parses fine) with UTC if it doesn't find another VTIMEZONE, I just commented out the overwriting for datetimes which already have an tzid which worked fine.

Offending line:

dt = dt.astimezone(tz)

My local version which works (get the same timezone out as the one I put in when I create the ical-file with the icalendar package).
screen shot 2019-01-21 at 16 58 32

Hultner added a commit to Hultner/icalevents that referenced this issue Jan 21, 2019

Fixes bug in icalparser
Fixes issue where the normalize function in icalparser would overwrite tzid from `DTSTART`/`DTEND` with UTC if there isn't a VTIMEZONE in the calendar file. Now properly handles a python object -> icalendar -> icalevents -> python object roundtrip without loosing `tzinfo`.

Fixes irgangla#12

@Hultner Hultner referenced a pull request that will close this issue Jan 21, 2019

Open

Fixes bug in icalparser #40

@ndw

This comment has been minimized.

Copy link

ndw commented Mar 13, 2019

That fix helps, but there's another bug. If a repeating event crosses over from when DST was not in effect to when it is in effect, the adjustment gets lost. A meeting started at 08:00:00-08:00 (8:00am America/Los_Angeles in January) is still reported as 08:00:00-08:00 in March when it should be 08:00:00-07:00.

@ndw

This comment has been minimized.

Copy link

ndw commented Mar 13, 2019

I believe I've fixed the repeating-events-crossing-daylight-saving-time boundary issue. I don't know what else I might have broken. "Works for me 😄"

https://github.com/ndw/icalevents

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.