[wp-xmlrpc] Daylight saving time and edting past post

Joseph Scott joseph at randomnetworks.com
Tue Mar 4 17:26:33 GMT 2008


On Mar 4, 2008, at 8:34 AM, Toby Simmons wrote:

> It would seem to me the easiest thing to do would be to honor  
> whatever time
> zone offset is sent in the dateCreated field ... in other words, if  
> the
> offset for a particular post is -5 hours, then the post would have:
>
> <dateCreated>2007-10-31 09:00:00-0500</dateCreated>
>
> So this means WordPress would calculate the gmt using "-0500" and  
> assume the
> time is local time. But if during standard time and the offset is -6  
> hours,
> then the post would have:
>
> <dateCreated>2007-10-31 09:00:00-0600</dateCreated>
>
> WP would calculate gmt using "-0600".
>
> Does that makes sense?



I've been burned by tweaking dateCreated in the past.  It's been  
around for quite awhile and adjustments to its behavior just broke  
things.  That's why we added the new date_created_gmt field.

dateCreated is assumed to be the local time, so no need for time zone  
offsets.

--
Joseph Scott
joseph at randomnetworks.com
http://joseph.randomnetworks.com/






More information about the wp-xmlrpc mailing list