WordPress.org

Ready to get started?Download WordPress

Forums

Is Permalink GMT/DST Flaw Real and Fatal? (6 posts)

  1. Aimsport
    Member
    Posted 8 years ago #

    Is the Permalink GMT/DST date/time shift problem real? It's called a fatal flaw by Blivet.com ( http://www.blivet.com/blog/2004/03/21/and-wordpress-is-driving-me-to-textpattern )

    Here's the description:
    --------------
    "WordPress stores blog entry dates in Greenwich Mean Time (GMT). Whenever WordPress builds a SQL query for blog entries by date, it must make an adjustment with an optional offset for the author’s current time zone. For example, this would be 8 hours for me during Pacific Standard Time (PST) and 7 hours during Pacific Daylight Saving Time (PDT).

    For about six months of the year the WordPress system works fine, providing the author doesn’t move between time zones. But when it’s time for everyone to change to or from Daylight Saving Time, the WordPress system breaks down. What happens? All the blog entries which fall outside the new time zone are shifted by one hour, possibly breaking date-based permanent links!

    It’s easy to see the potential for this breakage in my previous blog entry. I posted that between 11 p.m. and midnight on Thursday, March 11. If I was using a date- and title-based archive nomenclature then the permanent link might be:

    /archives/2004/03/11/spam-is-driving-me-to-wordpress.html

    Or some such. Well, as soon as Daylight Saving Time kicks in on April 4 of this year, that blog entry will suddenly be shifted to March 12 between midnight and 1 a.m.! Which means that WordPress would change its permanent link as well.

    What’s worse is that this can’t be easily fixed in WordPress. You can’t just adjust for Daylight Saving Time in the SQL query because you could be getting back a range of results across time zones. Storing the dates in GMT essentially loses the context of the original time zone in terms of the way WordPress constructs its SQL queries.

    Even though WordPress is very powerful and versatile, this date shifting really sucks. Especially for someone like me who’s made a large number of posts around midnight. Like this one.
    "
    ----------------------------------

  2. drmike
    Member
    Posted 8 years ago #

    - I love how there's no way to comment on that page.

    - Last time I checked, and I can't verify this since I'm on a one window locked down terminal, WordPress uses UTC time which doesn't change for Daylight Savings time since Daylight Savings time is different in many places of the world. Some countries don't even have one.

    - For someone who's "clever and persistent" and doesn't know what a gamma release is....

  3. davidchait
    Member
    Posted 8 years ago #

    - and the article is over two years old, WP 1.0 had probably barely launched. code has certainly been overhauled multiple times since then! ;)

  4. Aimsport
    Member
    Posted 8 years ago #

    Ummm. So I guess what you're saying guys.. is that there is nothing to worry about here... and that's a non issue?

  5. davidchait
    Member
    Posted 8 years ago #

    I believe the 'posting offset' is only for posting. Nothing else is affected. It is so you can offset your time from your server's local clock. So the timestamps NEVER change on posts. That's just as far as I know. I can't imagine this being an issue. And to boot, one we haven't heard of in over two years... ;)

    I could go check the actual query code and such, but I'm lazy, and have enough of a belief in the core devs that this isn't an issue.

  6. vkaryl
    Member
    Posted 8 years ago #

    Well, as far as "working", it works perfectly. Whether the "query code" is sterling or not, I don't know, but I'm not having a permalink problem when making the shift between MDT and MST (US). And in the two years I've used WP, I've not had a problem either.

    I tend to think this is at present a "non-issue"....

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.