phpBB

Development Discussion Board

phpBB's testing ground of bleeding edge code
Advanced search

[RFC]Automatic daylight detection

General discussion of development ideas and the approaches taken in the 3.x branch of phpBB. The next feature release of phpBB 3 will be 3.1/Ascreaus followed by 3.2/Arsia.

[RFC]Automatic daylight detection

Postby xerces8 » Sun Mar 27, 2011 12:29 pm

Hi!

Today was the day they(we) moved the clock forward one hour (DST) in Europe. Or better, today is the day I will spend correcting all the clocks I encounter.

One of them is the clock setting in phpBB based forums (user control panel).
Like this one here at area51.phpbb.com.
(I could not figure out which version is running here, I looked in the page source. So if this is already done, I apologize for the noise.
On related note, is there a running demo of 3.1 or newer versions available? Public?)

So:
Can you please make the forum automatically switch DST?

Many thanks (I am member of dozens and dozens of forums. With this change I would not spend the entire sunday changing settings on all of them),
David
xerces8
Registered User
 
Posts: 11
Joined: Sat Nov 27, 2010 1:12 pm

Re: [RFC]Automatic daylight detection

Postby xerces8 » Sun Mar 27, 2011 3:12 pm

OK more info.

The post [RFC] Local time handling by Javascript suggests that that manual DST switch would not be required any more in 3.1.

But 3.1 Status does not list any related change. (at least I did not spot it)

Also reading http://www.phpbb.com/community/viewtopic.php?t=463930 I learned, that the current implementation is basically a UTC + N (+1).

This also explains the issue I encountered and planned to report as a bug, but now I think it should be discussed first.

The issue is:
After the user manually corrects the time setting for DST, old post dates are displayed wrong. Example:
viewtopic.php?f=99&t=35034

If you view this without being logged in, the time of the second post is 2:09 AM. The bottom of the page says "All times are UTC [ DST ]".
If I (or anyone else) logs in and sets the Timezone in his Board Preferences to UTC+1 and DST to No, the time of that post is displayed as 3:09 AM.
And if the users sets DST to Yes, as since today DST is in effect in EU, the time of that post will be shown as 4:09 AM, which is wrong.

According to the notification email that I received for that post, it was created at , quote from email header:
Date: Sun, 28 Nov 2010 02:09:07 +0000

So:
- the first case (not logged in, UTC) is OK. Except: Why does the bottom of the page say "All times are UTC [ DST ]" ? It is plain UTC. With zero offset. Why is DST mentioned?
- the second case is OK
- the third case is wrong. It shows 4:09 AM , when correct time of that event in Central European Time is 3:09 AM. Now it shows as if I (the user) selected timezone UTC+2.



None of this would happen, if the idea from [RFC] Local time handling by Javascript would be implemented. ;)
xerces8
Registered User
 
Posts: 11
Joined: Sat Nov 27, 2010 1:12 pm

Re: [RFC]Automatic daylight detection

Postby xerces8 » Sun Mar 27, 2011 3:23 pm

PS: The time of this posting is 17:22 local time (CET) or 15:22 UTC.
xerces8
Registered User
 
Posts: 11
Joined: Sat Nov 27, 2010 1:12 pm

Re: [RFC]Automatic daylight detection

Postby DavidIQ » Sun Mar 27, 2011 4:02 pm

Far as I can see there is no "bug" there. If a user sets their DST flag then all times will have whatever UTC they have selected in their profile plus one hour. If they set their time zone to UTC+1 to compensate for DST then that is an error of the user and not the software.
Image
User avatar
DavidIQ
MOD Team Leader
MOD Team Leader
 
Posts: 753
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth

Re: [RFC]Automatic daylight detection

Postby xerces8 » Sun Mar 27, 2011 5:59 pm

Hmm, maybe here is a misunderstanding.

I (the user) set "[UTC + 1] Central European Time, West African Time" and "Summer Time/DST is in effect" to Yes.

Which is correct. I am in EU (CET time zone) and DST is (as of today) in effect.
So there is no error on the part of the user.
xerces8
Registered User
 
Posts: 11
Joined: Sat Nov 27, 2010 1:12 pm

Re: [RFC]Automatic daylight detection

Postby DavidIQ » Mon Mar 28, 2011 2:25 am

Looking over what you wrote again it seems as if there might be a bug where the post times are being calculated off of the board's time settings. Should report it to the tracker.
Image
User avatar
DavidIQ
MOD Team Leader
MOD Team Leader
 
Posts: 753
Joined: Thu Mar 02, 2006 4:29 pm
Location: Earth

Re: [RFC]Automatic daylight detection

Postby Oleg » Mon Mar 28, 2011 7:41 am

The relevant RFC for 3.1 is this: viewtopic.php?f=84&t=32826

The timezone/dst implementation in 3.0 does display incorrect times for posts that were posted when dst was off when those posts are viewed with dst on. This will not be fixed in 3.0, the new timezone implementation in 3.1 will handle this properly.
Oleg
3.1 Release Manager
3.1 Release Manager
 
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am

Re: [RFC]Automatic daylight detection

Postby Oleg » Mon Mar 28, 2011 7:45 am

Moved to discussion since there is a request but no implementation proposal in this topic.
Oleg
3.1 Release Manager
3.1 Release Manager
 
Posts: 1150
Joined: Tue Feb 23, 2010 2:38 am


Return to [3.x] Discussion

Who is online

Users browsing this forum: No registered users and 18 guests