Buca Bay - Always nice

Dua tiko noqu toa loaloa, na yacana ko… laga mai…

Wordpress and Fiji Time

October11

I noticed that the dates on blog posts were off by a day, since the default timezone on a Wordpress install is about a day behind Fiji Time. So I reset the timezone to UTC +12. Unfortunately that doesn’t change the creation date of old posts.

So for that:

update wp_posts set post_date = post_date_gmt + INTERVAL 12 HOUR, post_modified = post_modified_gmt + INTERVAL 12 HOUR

Fortunately the wordpress developers are pretty savvy. They included the GMT dates which can be used as an absolute on which to get the timezone relative dates as above. Way to go wordpress.

In reality, all dates are relative, so the above would depend on the timezone setting of your database, and hopefully it is set correctly. It is most likely correct however. It may also be depended on the PHP timezone, if PHP is used to calculate the GMT times - I haven’t looked at the actual SQL inserts in wordpress so it could be either or.

 
posted under web development

Email will not be published

Website example

Your Comment:

 
Tag Cloud