Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yes, that's a good point. At least it's a start (though I'm dubious about some assumptions the code makes regarding time zones).


Well, tzdata zones usually either always have per-year entries (such as Morocco) or entries that describe "from now on". So the logic in the code would be valid for places like the US that very infrequently change DST rules -- it would only break if the US changed their DST rules after 2037. It appears anglocentric, though. If a user in Morocco used this on their system, it would undoubtedly lead to errors because Ramadan falls on different days every year and DST is not observed during Ramadan. Things would start to fail in subtle ways because DST might not be calculated correctly for a few days here or there every year depending on what timezone it is used with.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: