Bug report: timezone issue
-
Hi,
Times entered by users should be in whatever timezone they have set. In WordPress timezones are set on a per-site basis and stored in the
timezone_string
option.Assume MySQL’s timezone is set to UTC, and WordPress’s timezone option is set to Europe/London (currently UTC+1). If a user sets a post to expire at 1pm, that post will expire at 1pm UTC not 1pm Europe/London. From the user’s perspective, the post will expire at 2pm. This is a bug.
I have two small recommendations that would fix this bug:
- Convert the timestamp from the timezone set in
timezone_string
to UTC before storing it withupdate_post_meta
- Replace
NOW()
in the MySQL queries withUTC_TIMESTAMP()
Hope this helps,
Mallory Adams, dxw - Convert the timestamp from the timezone set in
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Bug report: timezone issue’ is closed to new replies.