Closed danielfarrell closed 10 years ago
I'm not sure if this is the correct way to fix this, the dates are timezone specific, we can get this information using timezone:
time_zone = TZInfo::Timezone.get("Europe/London").current_period
time_zone.start_transition.at.month #=> 10
time_zone.start_transition.at.day #=> 26
time_zone.start_transition.at.to_time.strftime("%A") #=> Sunday
time_zone.start_transition.at.to_time.strftime("%H:%M") #=> "01:00"
time_zone.end_transition....
That is probably a better long term fix, I agree. Just thought I would share this in case other people got bit by it this week.
Thanks, for bringing this up.
It should be noted this this does not work at all when not in DST anymore. The API complains about missing StandardTime and DaylightTime blocks. In my working branch I've just removed the .dst? query to make it work.
These changed in 2007.