Hi Kurt, On 20 June 2011 18:22, Kurt Werle <[email protected]> wrote: > I use several 3rd party gems (ri_cal and others) that can generate > times for me. These libraries sometimes wander into AmbiguousTimes - > when they are generating repeat events, for example. > > I would rather not have to worry about AmbiguousTimes, ever. It seems > like a simple solution is to provide a default for the dst value that > is passed in when generating local times. To this end, I have > attached the included patch file, complete with tests.
Thanks for the suggestion and your patch. > I hope it can be integrated into tzinfo in the near future. I have committed your patch to svn. The change will be included in the next release. In the commit, I also set the default value of the dst parameter of the local_to_utc method to default_dst. Without this, local_to_utc would still raise an AmbiguousTime exception in transitions from daylight savings time. I also made a change to the test cases to make sure default_dst was reset back to nil after being changed to avoid having an impact on any of the other test cases. Kind regards, Phil _______________________________________________ TZInfo-users mailing list [email protected] http://rubyforge.org/mailman/listinfo/tzinfo-users
