- 
                Notifications
    You must be signed in to change notification settings 
- Fork 361
Open
Description
I had an issue where all dates were off by 3 hours (our current offset to UTC).
I went down a rabbit whole. It seems the iCal timezones are not correctly perserved
Here's a reproduction:
> schedule = IceCube::Schedule.new(Time.current)
{
    :start_time => {
        :time => 2025-06-17 15:06:35.246698923 UTC, # ✅
        :zone => "Europe/Helsinki"# ✅ 
         ...
}
> # add rules and stuff
> ical_string = schedule.to_ical
"DTSTART;TZID=EEST:20250617T180635.... 
> ice_cube = IceCube::Schedule.from_ical(ical_string)
{
    :start_time => 2025-06-17 18:06:35 +0000,  # ❌  (timezone lost, time offeset, and time in UTC)
    ...
}Note how we went from 15:06:35 UTC to 18:06:35 UTC upon doing an iCal roundtrip, meaning we lost 3h in the roundtrip.
I wonder if the repo would be open to some overall breaking changes in this behaviour to be up to spec. Perhaps adopting icalendar gem as been proposed? -- https://github.com/icalendar/icalendar
Edit: corrected the issue
Metadata
Metadata
Assignees
Labels
No labels