Daylight Saving Time (DST) within one country

Discuss features as they are added to the new version. Give us your feedback. Don't post bug reports, feature requests, support questions or suggestions here.
Forum rules
Discuss features as they are added to the new version. Give us your feedback. Don't post bug reports, feature requests, support questions or suggestions here. Feature requests are closed.
Post Reply
Roberdin
Registered User
Posts: 1546
Joined: Wed Apr 09, 2003 8:44 pm
Location: London, United Kingdom

Re: Daylight Saving Time (DST) within one country

Post by Roberdin »

Mine keeps resetting itself to Los Angeles time :|
Rob
Martin Blank
Registered User
Posts: 687
Joined: Sun May 11, 2003 11:17 am

Re: Daylight Saving Time (DST) within one country

Post by Martin Blank »

That's because California is the coolest place around. :)
You can never go home again... but I guess you can shop there.
Crush
Registered User
Posts: 7
Joined: Sat Dec 25, 2004 8:38 pm
Location: Russia\Moscow
Contact:

Re: Daylight Saving Time (DST) within one country

Post by Crush »

olger901 wrote:Who cares about the time you got a clock in the right hand of the screen where you can see what time it is don't ya :D
You have not understood. :) Me time as does not interest a reference point. :D I have in view of, that it is necessary to count statistics of the sent messages and since at a forum years{summer} Moscow time is not supported it very difficultly :(
Excuse for bad English
Roberdin
Registered User
Posts: 1546
Joined: Wed Apr 09, 2003 8:44 pm
Location: London, United Kingdom

Re: Daylight Saving Time (DST) within one country

Post by Roberdin »

Moscow time? Unless you're French, everyone defines time by GMT. I don't see the difficulty... Moscow time is what, GMT+3? That's in the list isn't it?
Rob
User avatar
cyberCrank
Registered User
Posts: 560
Joined: Wed Jan 28, 2004 3:38 am
Location: Ethereal Bliss

Re: Daylight Saving Time (DST) within one country

Post by cyberCrank »

Yes -- Moscow is UTC (GMT/Zulu) +3 hours ...
Kinetix
Registered User
Posts: 10
Joined: Sat Sep 04, 2004 1:10 am
Location: Area 51B

Re: Daylight Saving Time (DST) within one country

Post by Kinetix »

Well, a decently accurate system of DST could be created with the following as server and user settings:

Time Zone: xx GMT

Daylight Savings:
  • Year-round
    Northern Hemisphere
    Southern Hemisphere
    No DST
And the proper code to handle DST, using mktime to see if a post was made during DST for this user.

Of course, it wouldn't show up as 13:37 for everyone if that's the time you made a post, because 13:37 would be YOUR local time, not the servers. Even if you were in the same time zone as the server, it would only be 13:37 for people in that same time zone as well. But I highly doubt the dev team will waste their time creating DST system like this. Maybe someone will create it as a MOD, if no one does and you really want it, do it yourself.
AlleyKat
Registered User
Posts: 57
Joined: Thu Aug 28, 2003 2:43 am

Re: Daylight Saving Time (DST) within one country

Post by AlleyKat »

Old debate, but I can't help to mention how it saddens me to see otherwise capable members ridiculing others for asking about a pretty basic function which is important to them.

"The forum clock is an hour off twice a year and all users have to set it manually" may not seem like an important issue either, but given this time and age it's pretty stupid having to set the time twice a year. Given the rules and differences (not to mention changes, as NeoThermic pointed out to me) for DST around the world I fully understand why the team does not "waste time" on this otherwise rather important question given how long phpbb3 has already been underway. There's just a good, wanted mod idea for 'us people in countries where such things are at a stable level', and that's a fine answer in itself. I hope a few of those originally writing what they wrote in this thread are ashamed of themselves.
"This is the place where the sun don't shine"
3247
Registered User
Posts: 8
Joined: Sat Feb 21, 2004 12:25 pm
Location: Munich, DE

Re: Daylight Saving Time (DST) within one country

Post by 3247 »

Kinetix wrote: Well, a decently accurate system of DST could be created with the following as server and user settings:

Time Zone: xx GMT

Daylight Savings:
  • Year-round
    Northern Hemisphere
    Southern Hemisphere
    No DST
And the proper code to handle DST, using mktime to see if a post was made during DST for this user.
Ouch, it is not that simple. The exact date for the switch to and from DST is not the same in all countries on the same Hemisphere. Operating systems let the administrator choose from a list of cities, which represent an area of a certain time zone. For example I have the timezone "Europe/Berlin" (Linux/GNU libc) or "(GMT+01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna" (Windows).

Getting time zones right is tricky.

The first question is what time you want to display for forum posts. The time of the user who made the post (e.g. "13:37 +01:00") or the time of the user viewing the post (e.g. "09:07")? The first option tells the viewer what time the poster had in mind (so "it's nearly midnight" makes sense), the second option gives the viewer a better idea how the time relates to his "own" time ("ah, that post was written two hours ago"). For the first option, you have to store the time zone name ("Europe/Berlin") or offset (7200, probably the better solution) in the database; currently phpBB only stores the UTC timestamp.¹ For the second option, you have to know the time zone (incl. DST rules) of the viewer.

Option 1. The optimal solution would be to let the user choose his/her timezone (not "GMT+XX:XX" but "Continent/City") - with forum-wide defaults - and what time to display ("Show posts with original time zone"/"Show posts with my time zone"). This requires:
  • a list of all time zones ("Continent/City"). Unfortunatly, although GNU libc provides such a list (and Windows does, too), it is not easily accessible for application software, especially software based on PHP. So phpBB would have to duplicate the timezone information and all of the DST calculation methods, which is a lot of work (hard) unless support for this is added to PHP.
  • storing the original time zone (quite easy)
Option 2. If you don't allow users to view the original time zone, you can get away with:
  • a list of all time zones - same problems as above (hard)
Option 3. On the other hand, if you only allow users to view the original time zone, you only need to:
  • store the original time zone (quite easy)
Users would still switch their time zone manually in the forum. Hopefully, they do it right... or all of their posts will show the wrong time.

Option 4. A simple solution that may or may not help is to have a single time zone for the whole forum and show all times in this zone. This requires:
  • a user base which mostly resides within one time zone
  • the server must run on the desired time zone (very easy to implement in phpBB² but depens on the hosting service) or the administrator has to set the offset and DST rules (medium, the admin would have to rely on third party information to find out the correct time zone settings³).
¹ Which is an extremly good idea. It is nearly impossible to get TZ calculations right if you don't store your times in UTC. Google for "eBay" and "DST" for details.
² I did that for a private forum running phpBB 2.0.x (without implementing any configuration options)
³ If you include the list, you can already implement options 1 or 2.
User avatar
Highway of Life
Registered User
Posts: 1399
Joined: Tue Feb 08, 2005 10:18 pm
Location: I'd love to change the World, but they won't give me the Source Code
Contact:

Re: Daylight Saving Time (DST) within one country

Post by Highway of Life »

Option 1 does not seem very viable, for reasons you already posted, it would be a lot of work to gather and use all that information, and it might make choosing a timezone difficult for the end-user.

Option 2, is not that good either, for reasons you already mentioned.

The problem with option 3 and 4 is that it would confuse a lot of people, thinking they are viewing things in their own time, OR if they know it's in a different time, sometimes its difficult for a lot of people to make the conversion in their head.

How about option 5:
an option on registration to allow users to select: "Detect Daylight Savings time", which many boards have... I believe PCP for phpBB2 had it.
although, the problem with that is now the US has changed the month when Daylight Savings time begins and/or ends. So it would not be all constant per date.
However, if the "Detect" really "detects" the local time to see if it is DST, then this option would still be the best.

Will we see an implementation in this regard Meik?
Image
User avatar
Eelke
Registered User
Posts: 606
Joined: Thu Dec 20, 2001 8:00 am
Location: Bussum, NL
Contact:

Re: Daylight Saving Time (DST) within one country

Post by Eelke »

3247 wrote: Option 4. A simple solution that may or may not help is to have a single time zone for the whole forum and show all times in this zone. This requires:
  • a user base which mostly resides within one time zone
  • the server must run on the desired time zone (very easy to implement in phpBB² but depens on the hosting service) or the administrator has to set the offset and DST rules (medium, the admin would have to rely on third party information to find out the correct time zone settings³).

I'd like to give my support to option 4. I am one of those people with a local board, where probably 99+% of all users reside in the same timezone, with the same DST scheme, and I have been hoping for this option for a long time. It seems to be easy to implement, and it would save me from updating my user's timezones each half year through phpMyAdmin. I announce clearly that this is done for those that would happen to be in a different timezone; I'd rather inconvenience the minor precentage - if any - of international users on my board than having to ask all my users to do the same switch manually.

Option 4 may be made redundant if a more clever scheme is put in place, but for me it would be a great improvement.
Post Reply