[TxMt] Blogging: Post to Wordpress messes up date
Allan Odgaard
throw-away-1 at macromates.com
Mon Aug 14 06:13:36 UTC 2006
On 14/8/2006, at 6:54, Gerd Knops wrote:
> The patch below fixes the issue for me. It should work fine with
> all WP blogs that are in the same timezone as the user. Of course
> it'll break once WP gets fixed, but that doesn't seem to be on the
> horizon.
Did you check the WP source? There seems to be a few factors: the TZ
of the POST (though we convert to UTC, so that offset is always
zero), the TZ of the server, and the TZ configured by the user (for
his blog.)
In addition the code which splits the TZ offset into hours and
minutes will subtract the hours but add the minutes, but there is no
“reverse” of that which fixes this “encoding.” -- so a problem which
shows up for people in a TZ which is not a full amount of hours from
UTC.
Also, the code receiving the date computes two dates (with potential
different TZ offsets) and stores both in the database -- I am not
sure what the purpose of having two dates is.
So I would recommend simply not sending a date to WP systems.
As for fixing WP, I talked with io_error on #wordpress. He wasn’t
sure why my patches from last year hadn’t been rolled into WP, but
was certain that if I did one for the TZ problems, that one would --
and he seemed to have some authority to assign bugs to the other
commiters, so it might be worth submitting one. Though I am still not
sure why they store two dates in the database.
More information about the textmate
mailing list