Skip to content

UNTIL uses only utc when to_ical #535

@sysmugen

Description

@sysmugen

Hi.

Why ice_cube uses this:

      def build_ical(builder)
        builder['UNTIL'] << IcalBuilder.ical_utc_format(time)
      end

but not this:

      def build_ical(builder)
        builder['UNTIL'] << IcalBuilder.ical_format(time, force_utc)
      end

I use Japan time zone and when I use UNTIL it creates wrong UNTIL entry. See below.

start_time = Time.current
end_time = Time.current+2.hours
rule = IceCube::Rule.daily(1)
rule = rule.until(end_time)
IceCube::Schedule.new(start_time, end_time: end_time) { |s| s.add_recurrence_rule(rule) }.to_ical

Produces
"DTSTART;TZID=JST:20221008T225632\nRRULE:FREQ=DAILY;UNTIL=20221008T155635Z\nDTEND;TZID=JST:20221009T005635"

Any ideas?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions