WordPress.org

Ready to get started?Download WordPress

Forums

clock change (6 posts)

  1. pinguin87
    Member
    Posted 8 years ago #

    i have trouble with the clock change in germany.
    my time settings ar first 1 houre differ to the UTC an now 2 houres.
    the time in the option menu are right but all my post are in the shedule.
    for testing i change the differ to the UTC but there are no effects. i must ever wait 60 minutes and then my posts are publish.
    the only one what i can do is change the timestamp of the post on houre back, but thats no solution, what can i do??

  2. emeff
    Member
    Posted 8 years ago #

    I don't know if that's the reason but I have installed WP-plugin TimeZone and my posts are published directly.
    Plz try this and give some feedback.

  3. pinguin87
    Member
    Posted 8 years ago #

    no changes, the plugin shows the right timezone and the right Time, wordpress to, but all post are shedule for 60 minutes
    and the php-date output ist 01:11 an that is now the time in my timezone
    :-(
    edit:
    when i look at my page now, the count of the posts today are 2, but the 2 posts are yesterday, so i think the time in the whole system (maybe the server or wordpress) istn correct. maybe is this the problem, but the simple date function put the right time out

  4. pinguin87
    Member
    Posted 8 years ago #

    can't anyone help me?

  5. pinguin87
    Member
    Posted 8 years ago #

    now i have checked some functions in the blog and the result ist now,
    if the offest in the Options 2 houres, the values in the DB are
    ID author post_date post_date_gmt
    105 1 2006-03-27 15:14:44 2006-03-27 14:14:44
    but the current gmt-time is 13:14:44 an not 14:14, thats why the post didn't published.
    why is the gmt_time wrong when i write a post? if do change the timestamp to the right gmt_time the post is publish.
    Whats wrong?

  6. pinguin87
    Member
    Posted 8 years ago #

    oki i believe i have the problem located. the failure is the php-function "gmmktime".
    e.g.
    $string="2006-3-27 20:42:30";
    preg_match('#([0-9]{1,4})-([0-9]{1,2})-([0-9]{1,2}) ([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2})#', $string, $matches);
    $string_time = gmmktime($matches[4], $matches[5], $matches[6], $matches[2], $matches[3], $matches[1]);
    echo $string_time;
    $my=date('Y-m-d H:i:s', $string_time);
    echo $my;
    $string_gmt = gmdate('Y-m-d H:i:s', $string_time);
    echo $string_gmt;

    The input is my zulu time=UTC+2
    and now the output of
    date('Y-m-d H:i:s', $string_time); =2006-03-27 23:42:30, 3 Houres to late
    and the output of
    gmdate('Y-m-d H:i:s', $string_time); =2006-03-27 21:42:30, one houre to late

    now 2 questions, why add the function one houre to my given time when the function gmmktime interpreted this time as GMT?
    So the output must be 20:42:30.
    thats one failure

    an why assign the write_post function the time in my timezone an let interpreted as the GMT time?

    please i need help (not only in english ;-))

Topic Closed

This topic has been closed to new replies.

About this Topic