Real timezone support and no more DST flags

Discussion of general topics related to the new version and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Forum rules
Discussion of general topics related to the new release and its place in the world. Don't discuss new features, report bugs, ask for support, et cetera. Don't use this to spam for other boards or attack those boards!
Post Reply
Paul.J.Murphy
Registered User
Posts: 9
Joined: Mon Jun 16, 2008 4:49 am
Location: Edinburgh, Scotland, UK
Contact:

Real timezone support and no more DST flags

Post by Paul.J.Murphy »

Hi folks. I've just commissioned a new board based on 3.0.1, and decided I couldn't tolerate the broken / antiquated timezone handling which has been a twice yearly PITA for users and admins alike. I realise that this is probably due to lack of real timezone support in PHP prior to 5.1, but that's as good as ancient history now, and it's now well past time that phpBB moved to real timezones with automatic DST handling. So, here's a patch against 3.0.1 which uses the Unix style timezone support in PHP 5.1 and eliminates the DST flag, and I sincerely hope that something similar to this can make it into the main distribution for 3.2.

This patch has had relatively little testing so far, and I wouldn't want to claim that it's absolutely the best that it could be, or that I've not missed some obscure reference to "* 3600" or the DST flags (it's still there in the language files, as it didn't seem important to strip it out of them just yet), but I reckon it's most of the way there. It might be worth changing the option list to be hierarchical due to its size, but I've found it to be ok in monolithic form in Firefox 2.0 and Safari 3.1. Tested on Apache 2.2.8, PHP 5.2.6 (with Suhosin and pecl-timezonedb-2008.3), and PostgreSQL 8.3.3.


Cheers,

Paul.
Attachments
phpBB-3.0.1-timezone.patch
(29.22 KiB) Downloaded 440 times
User avatar
DavidMJ
Registered User
Posts: 932
Joined: Thu Jun 16, 2005 1:14 am
Location: Great Neck, NY

Re: Real timezone support and no more DST flags

Post by DavidMJ »

The way we handle dates in 3.2 is being overhauled, it will not be as bad as 3.0
Freedom from fear
Paul.J.Murphy
Registered User
Posts: 9
Joined: Mon Jun 16, 2008 4:49 am
Location: Edinburgh, Scotland, UK
Contact:

Re: Real timezone support and no more DST flags

Post by Paul.J.Murphy »

DavidMJ wrote:The way we handle dates in 3.2 is being overhauled, it will not be as bad as 3.0
Excellent, glad to hear it! Having just got my head around the interals for timezone/dst in 3.0, I'd be happy to help, if needed.
User avatar
DavidMJ
Registered User
Posts: 932
Joined: Thu Jun 16, 2005 1:14 am
Location: Great Neck, NY

Re: Real timezone support and no more DST flags

Post by DavidMJ »

We have this planned for a later milestone, so please try to hold on for a bit :)
Freedom from fear
Post Reply