
Oddities with date format
Hi Fredrik,
This is a very minor issue, some problems I'm having getting the time zone part of the date-time display to work. I'm setting the preferences here:
User Control Panel | Board Preferences | Edit Global Settings
Note that I have previously selected my time zone as "[UTC-5:00] Eastern Standard Time"
To generate the correct input string for the PHP Date() function, I referenced the table of input parameters defined here:
http://us3.php.net/dateCurrently my date-time format is defined as
"m/d/Y h:i:s a" which generates "01/30/2009 01:15:48 pm"
That works fine, but if I try to add some of the timezone identifiers, I get screwy results. Now, the following examples get pretty nit-picky, so if the timezone identifiers for the date() function just plain don't work correctly for this version of the phpBB software, what I'm trying to do is not possible anyway; so there's no need to read further.
********************************************************************************************
OK, here goes the nit-picking. If I add the "T" timezone identifier, I get this:
"m/d/Y h:i:s a T" generates "01/30/2009 03:15:16 am GMT"
According to the character table, "T" should generate the local time zone abbreviation, as in "EST". Because it generates "GMT" instead, I added "O" to display the offset from GMT:
"m/d/Y h:i:s a TO" which generates "01/30/2009 03:15:16 am GMT+0000"
Here the offset should be "-0500". "P" is supposed to generate the same offset with a ":" delimiter for hours:minutes, so I tried that. I got the delimiter OK, but the value of the offset is still spooged:
"m/d/Y h:i:s a TP" generates "01/30/2009 03:15:16 am GMT+00:00"
Next I tried the other time zone parameter, "e". It wasn't clear to me from the description what sort of abbreviation this would generate. It turns out to be:
"m/d/Y h:i:s a e" generates "01/30/2009 03:15:16 am UTC"
This put me back in the same place as "GMT", and I got the expected results by trying to add my local time zone offset:
"m/d/Y h:i:s a eO" generates "01/30/2009 03:15:16 am UTC+0000"
"m/d/Y h:i:s a eP" generates "01/30/2009 03:15:16 am UTC+00:00"
*******************************************************************************
As a workaround for now, I've used the literal "-05:00 hours" for my local time zone offset from GMT. e.g.,
"m/d/Y h:i:s a T-05:00" generates "01/30/2009 03:15:16 am GMT-05:00"
That's OK; the only drawback is that when Daylight Savings Time takes effect, and vice versa, I'll have to remember to change that offset to the corresponding value.
Have I messed something up here (most likely), or used parameters not currently handled by the board software? At the reference website I noticed that those time zone identifiers have annotations such as "added in PHP 5.1.0" and "added in PHP 5.1.3". Could this version of the phpBB software be the culprit?
In that context I searched the phpBB forum and found this thread that addresses the issues using the "T" timezone identifier:
http://www.phpbb.com/bugs/ascraeus/19645The workaround described is specific to "PHP 5.1 and above", but it's not clear if it was ever implemented in phpBB.
I hope I didn't generate a lot of ado over nothing here. As always, thanks for taking the time to read this,