Support » Fixing WordPress » changed timezone now all posts show january 1st 1970

  • Hi,

    I recently changed the timezone to Amsterdam and now all post dates show january 1st 1970 as publishing date in the frontend. In the backend all dates are correct. How can I fix this?

    thank you,


    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Samuel Wood (Otto)

    (@otto42) Admin

    You appear to be using a custom theme for that site. We’d need to know what code is outputting the date in the post to be able to tell you what’s wrong with it.

    Ok, thank you.

    found this:

    * Parse date into Dutch date string
    function kw_the_date_nl($date, $time = null, $ucf = true) { echo kw_get_the_date_nl($date, $time, $ucf); }
    function kw_get_the_date_nl($date, $time = null, $ucf = true) {
    setlocale(LC_ALL, ‘nl_NL.UTF-8’);
    $format = ‘%A %e %B %Y’;
    if (isset($time) && !empty($time)) {
    $format .= ‘ om %H:%M’;
    $date .= ‘ ‘ . $time;
    $t = strftime( $format, strtotime( $date ) );
    return $ucf ? ucfirst($t) : $t;

    • This reply was modified 3 months, 1 week ago by  wiitigoo.
    • This reply was modified 3 months, 1 week ago by  wiitigoo.
    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    Hmm. That’s interesting, but not really enough info to solve the problem.

    If you don’t want to post your theme code, feel free to email me a copy. My email is otto at wordpress dot org, and I’m happy to take a look and see what it might be doing that is out of the normal range for you.

    Hi Otto,

    No problem at all to post something, but what would you like to see? I am not a programmer so I need a little help to help you get the right code 🙂

    Ok, I’m a bit further. turns out only the last 3 posts are only having the wrong date and any new ones I create. Before this I made a change to the timezone in wordpress and changed it back. So I guess that has something to do with it? They d do all have the correct date and time in the backend, only the four most recent posts (all posted in August) have thursday january 1st 1970 0:00 as date and time in the frontend…

    Even changing a post to July 31st 23:00 goes fine, but if the month is August it goes wrong…

    • This reply was modified 2 months, 4 weeks ago by  wiitigoo.
    • This reply was modified 2 months, 4 weeks ago by  wiitigoo.

    resolved. By changing the language back to English. No idea why though…

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    What language pack did you change it to that caused the problem?

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