Make WordPress Core

Opened 14 years ago

Closed 13 years ago

Last modified 9 months ago

#125 closed enhancement (fixed)

problem with timestamps when blog timezone and server timezone differ

Reported by: donpaolo Owned by: matt
Milestone: Priority: normal
Severity: normal Version: 1.2
Component: Administration Keywords:
Focuses: Cc:


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 (5)

#2 @donpaolo
14 years ago

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

#3 @anonymousbugger
14 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 /

#4 @matt
13 years ago

  • fixed_in_version set to 1.5
  • Owner changed from anonymous to matt
  • Resolution changed from 10 to 20
  • Status changed from new to closed

This ticket was mentioned in Slack in #docs by kenshino. View the logs.

9 months ago

Note: See TracTickets for help on using tickets.