Support » Plugin: Post Expiration Date » Bug report: timezone issue

  • mallorydxw

    (@mallorydxw)


    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:

    1. Convert the timestamp from the timezone set in timezone_string to UTC before storing it with update_post_meta
    2. Replace NOW() in the MySQL queries with UTC_TIMESTAMP()

    Hope this helps,
    Mallory Adams, dxw

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’d like to confirm this. I am on Pacific Time, and it is expiring posts at UTC, not my WordPress Installation’s time zone.

    I need to amend my comment above. I am on Pacific time.

    When setting the expiry date, it appears to be going by UTC (if I set it any earlier than 7 hours ahead of the current time, it auto-drafts the post).

    The posts actually expire on EST (3 hours ahead of when scheduled for).

    Is there any way to get this sorted so it is all in the correct time zone? I can’t send it to a client this way.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.