This project is archived and is in readonly mode.
DateTime timezone support
-
Geoff Buesing
Not sure what you're identifying as an issue -- is it that DateTime instances don't recognize Daylight Savings Time, or is it that the zone returns a numeric offset instead of an abbreviation (e.g., "CET")?
Both of these issues are limitations of the Ruby DateTime class.
-
josh
- Assigned user set to Geoff Buesing
-
Andre Foeken
I think the issue is that is feels unnatural that both classes behave so differently. I'd expect the same api to work for whatever form of Date/DateTime/Time class I use.
I understand this may be a limitation of the Ruby classes that is difficult to change without breaking a lot of other stuff, but perhaps it might be worth it to achieve an even more uniform way of working with timezones.
With regards to the "CET" / "+0100" line I mentioned. It was a possible indicator of the problem why the DateTime class responded differently. The generic "+0100" should not use Daylight Savings, but the more specific "CET" should. Having DateTime not differentiate between them was, in my eyes, just a possible hint to a solution.
-
Geoff Buesing
- State changed from new to wontfix
Given that we already have ActiveSupport::TimeWithZone and the core Ruby Time class for dst-aware time needs, I don't think it would be worth the effort, and breakage of existing functionality, to try and graft dst-awareness onto DateTime instances.