Opened 9 years ago
Closed 8 years ago
#125 closed enhancement (fixed)
problem with timestamps when blog timezone and server timezone differ
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Administration | Version: | 1.2 |
| Severity: | normal | Keywords: | |
| Cc: |
Description
I work in a country with timezone=-4, and I put this value in my user options.
However, the server where the blog runs has timezone=+2.
When I post a messagge, it doesn't appear in the main page, if I post it with gnome-blog (metaweblog API).
Examining the database with phpMyAdmin, I see that the field post_date_gmt isn't correct: instead of showing 8:43, it shows 18:43. Hence the post, though appears published, isn't show in the main page.
It could be because of a incorrect management of timezones: instead of calculating
post_date_gmt = [server_post_time] - [+2 (server t/z)] + [-4 (blog t/z)] = post_time - 6
supposedly it calculates
post_date_gmt = [server_post_time] + [+2 (server t/z)] - [-4 (blog t/z)] = post_time + 6
I saw that the problems appear in the same form if I change my wordpress user timezone. I checked it with -3, -5, -6, -9, etc.
It could be a problem in the metaweblog API.
Change History (4)
comment:3
anonymousbugger — 9 years ago
The problem could be temporarily resolved (at least with reference to gnome-blog) commenting out line 1303
$post_date_gmt = get_gmt_from_date(date('Y-m-d H:i:s', $dateCreated));
in the function mwnewpost of the / metaWeblog API /

the post_date_gmt field gets right if I edit the post, set the edit timestamp flag and save.