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

UNTIL uses only utc when to_ical #535

Open
sysmugen opened this issue Oct 8, 2022 · 0 comments
Open

UNTIL uses only utc when to_ical #535

sysmugen opened this issue Oct 8, 2022 · 0 comments

Comments

@sysmugen
Copy link

sysmugen commented Oct 8, 2022

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant