[wp-hackers] Post Correct Timezone with DST

Eric Marden wp at xentek.net
Thu Dec 3 22:49:46 UTC 2009


On Nov 25, 2009, at 5:46 PM, Daniel Craig Jallits wrote:

> I want to display either Central Daylight Time (CDT) or Central  
> Standard Time (CST) as part of my post's timestamp [single.php]. I  
> have RTFM and searched the codex plus google with no positive  
> results. Can anyone point me in the right direction?

It is my understanding that all timestamps are stored in UTC, and then  
displayed via the offset set in the Admin. If you're using PHP 5.x  
you'll get a much more accurate choice of timezones, which should also  
handle automatic DST issues. On PHP4 its still all kinds of awful  
(i.e. you have to manually change the offset to make the time accurate).


- Eric Marden
__________________________________
http://xentek.net/code/wordpress/
tw: @xentek






More information about the wp-hackers mailing list