Posts Tagged ‘epoch’

Time Sucks

One of the hardest things to program is the Date and Time. This is especially true when your doing it on the web. Why is that? Using a unix timestamp is immensely helpful and resolves many of the complexities, but it does have some issues (besides the Y2K38 bug). Well lets take a look at some of the “typical” things you need to be aware of:

  • Your server is in one timezone, your users are in 23 others.
    Users don’t care what the time is at the site. They want things in their time.
  • Does your server even know your users timezone?
    You could do this with JavaScript, and send it to the server, but that’s a mess. Or send a timestamp to the client, and let JavaScript print it out. But that’s still messy.
  • Timezones aren’t obvious (think Indiana).
    Did you know some even use :30 such as UTC-3:30 for Newfoundland Standard Time.
  • Looking back in time (or forwards) is difficult (how many hours between X and Y accounting for leap years, and DST changes)?
    This is a mess, enough said. And just in case you have a formula, did you account for the conversion between Julian and Gregorian calendars? Don’t forget not everyone switched in 15 October 1582 / 4 October 1582. Going forward remember we’ll eventually have another leap day, since the Gregorian calendar isn’t perfect.
  • Your server observes DST. Does your user? When?
    Get the picture? Remember most states do, except for Hawaii (yea, that’s another Timezone) but Arizona doesn’t either, except for Navajo Nation. Again Indiana!
  • The Politics of Time…
    If you call UTC+2 Israel Standard Time, you upset visitors from Muslim nations like Egypt. Call it Central Africa Time, or Egypt Standard Time and your considered anti-semitic. Same goes for UTC+8, is it Chinese Standard Time or Hong Kong Time? Most avoid this by just listing UTC±N. Unfortunately this confuses people, especially Americans who only refer to timezones as “Eastern” (UTC-5), “Central” (UTC-6), “Mountain” (UTC-7) “Pacific” (UTC-8). Note these American names aren’t so common in all of North/South America.
  • Daylight Savings Time for 2007+
    Then you have a bunch of clowns who voted for the Energy Policy Act of 2005, creating the Y2K7 bug. The idea was an extra hour of daylight in the evening would reduce electrical use. What they didn’t realize is that it cuts daylight from the morning. My guess would be a follow up bill may fine the sun for failing to provide adequate light, and eventually include economic sanctions. :-P

I thought a while back this could suck. Think about all the time/money that goes into updating and testing systems for these few extra weeks of DST. What a drag.

Swatch Internet Time was an obvious bust, but perhaps we could all just use UTC?

In Search Of The Epoch Child

The UNIX Epoch is 00:00:00 UTC on January 1, 1970. That’s essentially the beginning of time for UNIX based systems. You know, “In the beginning when Ken Thompson and Dennis Ritchie created the /usr and the /etc1.

I’m curious if anyone has tracked down someone (preferably a geek) who was born on the Unix Epoch. I guess we can’t be too exact since the question would be “are you born when your head is out, or when your butt is out? Can the cord still be attached or do you need to be unplugged?” or something to that effect.

All kidding aside, it would be interesting to know if anyone has come to the realization that they are the Epoch Child. I’m not sure (any calendar scholars can help me out here), but it seems the last child to have a time standard’s origin coincide with their birth may have been Jesus (and obviously any other child born that night). In that case, it seems they likely it was rounded as best they could (see Wikipedia discussion of Jesus’s Birth Year and Date).

Remember to account for the timezone. For example if your born in New York, that’s -5:00. So anyone feel like finding him/her? Obviously some proof would be necessary to prove your the epoch child.

It would also be interesting to find some others, but this seems to be the most interesting.

1 Yea, lame Genesis joke.