[wp-xmlrpc] Daylight saving time and edting past post
Toby Simmons
toby at simmonsconsulting.com
Tue Mar 4 15:34:04 GMT 2008
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?
Cheers,
Toby
___________________________________
W. Tobias Simmons
Simmons Consulting, Web Design and Marketing
toby at simmonsconsulting.com
http://www.simmonsconsulting.com
Phone: 501.821.4230 / Fax: 501.244.4416
-----Original Message-----
From: Kimmo Suominen [mailto:kimmo at global-wire.fi]
Sent: Tuesday, March 04, 2008 3:50 AM
To: wp-xmlrpc at lists.automattic.com
Subject: Re: [wp-xmlrpc] Daylight saving time and edting past post
On Mon, Mar 03, 2008 at 05:09:15PM -0700, Joseph Scott wrote:
>
> We've discussed adding a wp.getBlogOptions( ) method that would
> expose a variety of settings/options for a WordPress blog, including
> the time zone offset. I haven't done any real work on that yet.
> Hopefully once 2.5 ships (later this month) I'll be able to get that
> in for inclusion to 2.6.
The current time zone offset in the WordPress settings cannot be used
as the correct offset for any given article.
The basic simple example of why not is, if you currently observe
daylight saving time and edit an article that was originally created
during standard time, the correct time offset for the article differs
from the one in WP settings.
I'd really like to see just GMT stored in the database, but this cannot
be done:
- apparently there is no general zoneinfo interface we could use that is
available to us through PHP (4.x)
- people can move from one time zone to another and we prefer for them
to be able to reflect the time zone they were in while writing any
given article
Unless we store the time zone offset for each post in the database, it
probably is the best current(ly available) practice to calculate the
difference from the two time stamps we have in the database already.
Best regards,
+ Kimmo
--
<A HREF="http://kimmo.suominen.com/">Kimmo Suominen</A>
More information about the wp-xmlrpc
mailing list