When I started building my customized WordPress theme some months ago, I decided to adopt ISO 8601 international standard for date and time representation. After having paused for many months, during these last few days I started again to work on the code and today afternoon I have finished it.

After having installed the new theme, I discovered that there was a problem. With PHP 5 you just need to use the letter ‘c’ as an argument for the date function and the date will be automatically formatted according to the ISO 8601 standard. Unfortunately even if on my PC I have installed PHP 5, I discovered on my provider’s server it is still running PHP 4…

I was in hurry so I found the first thing rapidly working: ‘r’ command, RFC 2822 format, that’s ok for that moment.

Having a little more time, this evening I have worked for few minutes in order to format manually the date and time following the ISO standard. The only problem was the difference between the GMT, the time at which I write posts and finally the time on the server!!!

I already knew that WordPress can modify the GMT time in order to adapt it to your time zone (under the ‘Options’ panel there is where to write how many hours must be added or subtracted), but today I discovered it is not able to regain that value when you print out the time stamp plus your time zone designator, instead of your setted value it gains the time zone of the server, in this case -06:00. However I live in Italy not in the State of Utah, so my time zone designator is +01:00 (or +02:00) and not -06:00.

Given this problem, and given also the fact that every year you have to change manually that value when it starts the daylight-saving period, I decided to revert to plain GMT, or better to the UTC. So from 2008-03-14T21:00:00Z on all posts will appear with a “Z” at their end. That letter stays for “Zulu Time” alias UTC, once were GMT

Old posts will appear with a “+01:00″ string at their end. This means their time was set according to central Europe (Berlin, Rome, etc.) time zone. If I will have time I will write also a piece of code for the old posts written during the the daylight-saving periods.Done.

The discussion is open, but no one has taken the first step yet... Oh! For heaven's sake, start saying something Janet!

Your basic data, please...
Just say something!

And if you like you can use these strange things: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

EN IT ZH EU