The much debated DST MOD

This forum is now closed as part of retiring phpBB2
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
Post Reply
Stevish
Registered User
Posts: 12
Joined: Thu May 11, 2006 4:23 am

The much debated DST MOD

Post by Stevish »

I've been looking for a mod that will automatically change the entire board's time for Daylight savings time. The problems with this are these:
  1. Not everyone in the world (or even the US) uses daylight savings.
  2. Those who do, switch their clocks on different days.
So, instead of just asking for this MOD... I've decided to do a little brainstorming and research so that all that's left to do is write the php (which is what I can't do). That way if someone decides to make it, I've done what I can to help.

Problem 1 is simple to solve, by having a DST switch in their user profile. With the title: "Use DST?" and a description of "Select 'yes' (or 'check this box') if you want your time to be automatically adjusted for Daylight Savings Time."

Problem 2 is where the research comes in. Here is a list of all the countries I am aware of that use DST, and when they switch:
  • Egypt -
    Start: Last Friday in April
    End: Last Thursday in September
  • Namibia
    Start: First Sunday in September
    End: First Sunday in April
  • Most states of the former USSR.
    Start: Last Sunday in March
    End: Last Sunday in October
  • Iraq
    Start: April 1
    End: October 1
  • Israel
    Start: April 1
    End: The Saturday between
    Rosh Hashana and Yom Kippur (I have no idea)
  • Lebanon, Kirgizstan
    Start: Last Sunday in March
    End: Last Sunday in October
  • Palestine (Estimate)
    Start: First Friday on or after 15 April
    End: First Friday on or after 15 October
  • Syria
    Start: April 1
    End: October 1
  • Iran
    Start: the first day of Farvardin
    End: the first day of Mehr
  • Australia - South Australia, Victoria, Australian Capital Territory, New South Wales, Lord Howe Island
    Start: Last Sunday in October
    End: Last Sunday in March
  • Australia - Tasmania
    Start: First Sunday in October
    End: Last Sunday in March
  • New Zealand, Chatham
    Start: First Sunday in October
    End: Third Sunday in March
  • Tonga
    Start: First Sunday in November
    End: Last Sunday in January
  • European Union, Greenland, UK
    Start: Last Sunday in March at 1 am UTC
    End: Last Sunday in October at 1 am UTC
  • Russia
    Start: Last Sunday in March at 2 am local time
    End: Last Sunday in October at 2 am local time
  • United States (the States who recognize it), Canada (excluding Saskatchewan), Mexico St. Johns, Bahamas, Turks and Caicos
    Start: First Sunday in April
    End: Last Sunday in October
  • Cuba
    Start: April 1
    End: Last Sunday in October
  • Brazil (rules vary quite a bit from year to year). Also, equatorial Brazil does not observe DST.
    Start: First Sunday in November
    End: Third Sunday in February
  • Chile
    Start: Second Saturday of October - at midnight
    End: Second Saturday of March - at midnight
  • Falklands
    Start: First Sunday on or after 8 September
    End: First Sunday on or after 6 April
  • Paraguay
    Start: First Sunday in September
    End: First Sunday in April
  • Antarctica (varied)
Wow... that's a lot of rediculous stuff. The most automated way to do it, in my mind, is have a place that says "If you selected to use DST, what is your location?" and have a list of all those options.

But I don't think I'd do it that way. The way I would choose to do it is to have a few popular presets in the programming, and then have a place where the board administrator could add his own options (because DST laws do change from time to time, and the board admin would have a better idea of the location of most of his users). If this case was chosen, then perhaps a place for the users to input their own information would be provided as well (in which case the user settings would override the programmed settings).

Another issue was different offsets (In the USA we change clocks by one hour, I've heard some countries change more or less but couldn't find a list). If this was an issue, one could either find a list (not reccommended) or include a feild for users to enter their offset, and have the default set to 60 minutes.

Yet another method for adding a DST mod, is to simply have a switch in the user profile where they can turn daylight savings on/off by themselves, but also have a way for the board admin to do this for all users simultaneously.

My main wish for a DST mod is that it wouldn't require anything from my users once they set up their accounts. I have some very computer illiterate folks who will do the bare minimum to register, and then they expect everything to function properly after that... which it does... except for the times.

For now I am content with downloading a simply DST switch mod (I think I saw one of those), but if anyone wants to make a more automated one, I hope this information is helpful.
Merlin Sythove
Registered User
Posts: 2339
Joined: Tue Mar 16, 2004 7:42 am

Post by Merlin Sythove »

Code: Select all

MOD Admin_timezone / Summertime mod (MS)
	March 2005 Will change all user time zones upon request if the config time zone is changed, 
	if they had the same old time zone, to the new board time zone.
I made this, I posted the code somewhere as well I think, anyway, if you think this covers it, I'm willing to have a further search.

So if the board time zone is GMT+1 and you change it to GMT+2 to adjust for summer time, you can click a radio button to change all user time zones who have GMT+1 to GMT+2 as well.

If you want more control, you do need a country field in the profile, and a list of DST changing times for all countries.
Need custom work done? Pimp My Forum!
Post Reply

Return to “[2.0.x] MOD Requests”