Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

pudge (1)

pudge
  (email not shown publicly)
http://pudge.net/
AOL IM: Crimethnk (Add Buddy, Send Message)

I run this joint, see?

Journal of pudge (1)

Tuesday October 22, 2002
12:34 PM

Daylight Savings Time

[ #8530 ]
DST sucks, in case you didn't know.
  • America doesn't entirely follow it (see Indiana).
  • Europe does it on different days, and at 1 a.m. instead of 2 a.m.
  • Australia has it reversed from Europe (being down under), but at 2 a.m., and not all the country follows it: apparently there is an Australian Western Daylight Time, but it is not actually used.
  • New Zealand's DST -- which started the beginning of October, not the end -- is GMT +1300h. Note that the date line is +1200h and -1200h. Freaks.
  • Israel doesn't follow any specific calendar date for DST, but changes it every year by law.
  • Iraq follows their own calendar, one I can't be bothered to figure out.

Oh, and there is a lot more, of course, but that's some of the more interesting points to me right now. I've coded up DST-adjustment stuff for Slash, which involves:

  • Removing all daylight savings timezones from the list you may select from, and adding them as separate fields to the standard timezones (so you may not select EDT, only EST). Also, a script to move people from old timezones to new ones (some changed names, some were consolidated, etc.).
  • Adding a new table for dst "regions", which currently are America, Europe, Australia, and New Zealand. These comprise a set of numbers that describe when DST begins and ends for that "region." Each timezone with a corresponding daylight savings timezone may have a DST region, so DST may be automatically adjusted for users with that timezone.
  • Adding a new preference to select that DST is adjusted Automatically, or is Manually On, or is Manually Off. So for you people in Israel, you can just select Eastern Europe time and then adjust Manual On/Off for yourself.
  • Then there's the code, that on authentication, will check the current time against the timezone and region you are in and see if you should be in DST, and if so, adjusts your offset and timezone accordingly (EST/-18000 -> EDT/-14400) .
  • For selected timezones that have no "region," DST will not be set automatically, but may be set manually. If the timezone has no corresponding daylight savings timezone, and Manual On is selected, then a default of +3600 is used for the offset adjustment.

This will be going live today, and hopefully will kick in this weekend for those of us in Australian, European, and American timezones.

Now Playing: Sports & Wine - Ben Folds Five (Ben Folds Five)

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • An additional complication you didn't mention is that according to http://webexhibits.org/daylightsaving/b.html [webexhibits.org], the European time zones all change at once, at 01:00 UTC, whereas in the US each time zone changes at 02:00 local time.
    • Dog! Europe changes at 1 a.m. UTC? I thought it too was local time, I didn't read it carefully enough. I'll leave it where it is though; people can be off an hour or three a year. :)
      • I was in Ukraine for the DST this year and didn't even notice it due to the 8-hours of jetlag. :) I arrived the very day of the changeover, and was there for the one week the country is off from my timezone by seven instead of by eight. At the very moment my home CST timezone changed I was standing in Kiev looking at a huge monument to Vladimir.

        --
        J. David works really hard, has a passion for writing good software, and knows many of the world's best Perl programmers
  • You forgot Arizona.
    --
    Were that I say, pancakes?
    • If you mean forgot to mention it in the journal, yeah, I just skipped it. If you are talking about the code (some other people will surely ask this, even if you aren't), the idea is to select Pacific time, and set DST to "Manual (Off)", so it will be on PST year-round.
      • I did mean the journal.

        In a former life I had to create a web based
        system for setting the date & time and TZ
        on windows boxen. I too opted for a condensed
        list with the togglable DST. Marketing hated
        it; it wasn't exactly like MicroSoft :-P
        --
        Were that I say, pancakes?
  • I don't claim to know anything about the timezones of australia other than the eastern side.

    Basically you've got AEST and, most of the time, the eastern side follows that.

    However, Queensland never goes into DST (it being northern). ACT/NSW/Vic do, as does Tasmania, but Tasmania does it a few weeks earlier (it being more southerly).

    As for the western side and central, I try not to worry.
    --
      ---ict / Spoon
  • That's daylight saving time. :)

    NIST [nist.gov] has a great site at www.time.gov [time.gov], for those of you who would like to read everything possible about DST.