I concur when coding Python. Ruby (specifically Rails) makes it so much easier.
- Damon Cortesi
...and then someone should speed up the time it takes the Earth to go around the sun to 100 days. I never liked the idea of changing the world solely for us to make it easier to model. There has to be more reason, and I couldn't ever find it with metric time. Besides, there are better ways to do it, See: Ruby on Rails.
- Ryan Massie
I agree that python is particularly bad.
- Joe Beda ()
I just hate time zones. There are some days I really wish that "swatch time" had ruled the world.
- Jason Adam Young
Only use datetime.datetime objects (always in UTC, although you'll probably end up with naive objects that are in UTC by convention), or a Python float (seconds since Epoch, UTC). Converting to/from local time is a pain in the butt.
- Tudor Bosman
Depends which code you are using. For instance Python is pretty bad.
- Nicholas James
Why doesn't Python provide a way to convert to/from an arbitrary timezone in the default distribution? (Except, on Unix, time.tzset() and friends, which requires you to set the desired timezone in the TZ environment variable. An environment variable? Really? Threads, anyone?) Why doesn't Java use the system's zoneinfo library, and so you have to upgrade the JRE whenever some government somewhere decides to change the rules? Why doesn't pytz (a decent third-party package) use zoneinfo, either?
- Tudor Bosman
Of course, the rules are dumb, too. From Wikipedia's entry on Daylight saving time: Start and end dates vary with location and year. Since 1996 European Summer Time has been observed from the last Sunday in March to the last Sunday in October; previously the rules were not uniform across the European Union. Starting in 2007, most of the United States and Canada observe DST from the second Sunday in March to the first Sunday in November, almost two-thirds of the year. The 2007 U.S. change was part of the Energy Policy Act of 2005; previously, from 1987 through 2006, the start and end dates were the first Sunday in April and the last Sunday in October, and Congress retains the right to go back to the previous dates now that an energy-consumption study has been done.
- Tudor Bosman
"Congress retains the right to go back to the previous dates now that an energy-consumption study has been done." -- really?
- Tudor Bosman
Anyway, </rant>. I hate DST with a passion; I hate timezones slightly less.
- Tudor Bosman
Sure, decimal time is cute, but it doesn't solve the hard problems of dates -- namely, dealing with the fact that they have to correspond to astronomical events to be useful, but said events have no integral relationships among them. What *I* really can't understand is when I see dates communicated *among computers* in any form other than (seconds from some fixed point). Seriously, why the hell do we have specs (HTTP, I'm looking at you, but you're not alone) that allow dates to be communicated with stupid strings like "Sun, 06 Nov 1994 08:49:37 GMT"?
- Joel Webber
Ugh. I hate all those ISO dates, too. I mean.. day of the week?? really, international standards bodies?? Unix time is a nice format, or at least something like YYYY/MM/DD HR:MIN:SEC -#### easily human readable and easily parseable. And since 4 digit year is first it clearly isn't one of the american/euro which is first month or day issue.
- felix