[wp-trac] Re: [WordPress Trac] #3962: XML-RPC Incorrectly Handles
New Daylight Savings Time
WordPress Trac
wp-trac at lists.automattic.com
Mon Apr 9 20:27:15 GMT 2007
#3962: XML-RPC Incorrectly Handles New Daylight Savings Time
------------------------------+---------------------------------------------
Reporter: iacas | Owner: anonymous
Type: defect | Status: new
Priority: normal | Milestone:
Component: XML-RPC | Version: 2.1.2
Severity: normal | Resolution:
Keywords: reporter-feeback |
------------------------------+---------------------------------------------
Comment (by molecularbear):
I have been experiencing "'''Problem 2: Viewing'''" that the original
poster describes (all dates appear correct, server time is correct, I have
adjusted the UTC offset in WP, etc). I found that newly published posts in
the database had the correct {{{post_date}}}, but that the
{{{post_date_gmt}}} was off by one hour. I tracked the problem to function
{{{get_gmt_from_date}}} in {{{formatting.php}}}, but found that the issue
ran deeper than the WP code.
Function {{{gmmktime}}} depends upon function {{{mktime}}}. I am running
PHP 4.3.4, but according to the [http://www.php.net/ChangeLog-4.php PHP
ChangeLog], there was [http://bugs.php.net/27719 a bug] in {{{mktime}}}
that was fixed in PHP 4.3.6.
To see if you have the same problem, check your PHP version with {{{php
-v}}}, or run this:
{{{
echo gmdate('Y-m-d H:i:s', gmmktime(0, 0, 0, 4, 20, 2007)) . "\n";
}}}
The correct output is this:
{{{
2007-04-20 00:00:00
}}}
The problematic output is this (i.e., an hour off):
{{{
2007-04-20 01:00:00
}}}
--
Ticket URL: <http://trac.wordpress.org/ticket/3962#comment:11>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list