cloud-atlas-ai / obsidian-ics

Generate Daily Planner from ical feeds
MIT License
142 stars 27 forks source link

BUG: Daylight time shift led to incorrect hours #79

Closed muness closed 1 year ago

muness commented 1 year ago

With the time change, some of my event times are incorrect.

kfitz commented 1 year ago

Mine too! And I'm not sure if you saw my comment on the prior closed issue, but that daily recurring event is now CORRECT! The first day of the event is in standard time, so it's correct now and incorrect during daylight saving time.

muness commented 1 year ago

Thanks for confirming, @kfitz . I hate timezones and especially DST...

Maybe I should invest in a debug mode that gives us more details (about the original event timezome for recurring events?) in the console that we can include in bug reports.

muness commented 1 year ago

On debugging, I believe the issue is that I am currently using UTC offsets to calculate the event's new time. This correctly means that a 10am EDT (-0400) becomes 9am EST (-0500).

Fixing to not use UTC offsets.

muness commented 1 year ago

Please reopen if the issue(s) persist!

muness commented 1 year ago

Mine too! And I'm not sure if you saw my comment on the prior closed issue, but that daily recurring event is now CORRECT! The first day of the event is in standard time, so it's correct now and incorrect during daylight saving time.

This was the key. I am guessing this even was in EST. When we flipped back to EST, it became correct again. The new code should no longer flip back and forth, keeping events constant when DST changes.