ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Problem with time jumping forward and backward an hour

May 14, 2010 4:16pm

Subscribe [3]
  • #1 / May 14, 2010 4:16pm

    Rusty T.

    42 posts

    Weblog entries and comments are not consistently using the correct time. Comments are being stamped with either the correct time or an hour ahead or an hour behind, thereby having comments displaying in the incorrect order. The same is happening with weblog entries—I noticed that if I click Publish and select the Date tab, the date will sometimes be the correct time, and sometimes be an hour off—either ahead of behind one hour. Clicking ‘today’ to refresh the time, brings the minutes to the current minutes, but the hour will still be off by the same hour. If I return to the CP Home and repeat the process, sometimes it will show the correct time. If I go to the Edit screen to edit an old entry, clicking on the Date tab and selecting ‘today,’ the same incorrect time sometimes applies.

    There seems to be no consistency with this. I am assuming that this same inconsistent application of the correct and wrong times is occurring with comments, however, the timestamp on those cannot be easily corrected—nor can I feasibly correct it with every comment my site gets.

    EE 1.6.8 Build:  20091202

    Admin›System Preferences›Localization Settings:
    Server Time Zone: UTC -6 Central Standard Time  
    Server Offset (in minutes): [blank]
    Default Time Formatting: United States
    Daylight Saving Time: No  
    Honor the Daylight Saving Time setting associated with each weblog entry?: No

    My Account›Localization Settings:
    Select Time Zone: UTC -4 Atlantic Standard Time (equivalent of UTC-5 for DST) 
    Daylight Saving Time: [Not Checked]
    Time Formatting: United States  
    Select Language: English

    My Account›Member Administration›Member Preferences:
    Use this member’s localization settings as the master site default? [Checked]

  • #2 / May 14, 2010 8:38pm

    Brandon Jones

    5500 posts

    Hi Rusty,

    Since there was some confusion previously, the first thing I’d recommend is a version upgrade to 1.6.9 to ensure a fresh set of files and see if the problem persists.

  • #3 / May 17, 2010 11:02am

    Rusty T.

    42 posts

    This:

    <?php echo "Server time zone: " . date("T"); ?> 
    
    <h1>Test of various time/date functions:</h1>
    
    <h3>Server</h3>
    <p>PHP date: <?php echo date('dMy h:i');?>(echo date('dMy h:i');)</p>
    
    <p>PHP gmdate: <?php echo gmdate('dMy h:i');?>(echo gmdate('dMy h:i');)</p>
    
    <h3>Database dates(GMT/UTC)</h3>
    <p>LOC now: <?php global $LOC; echo 'held in db as '.$LOC->now; echo ' which is '.date('dMy h:i',$LOC->now); ?> (date('dMy h:i',$LOC->now);)</p>
    
    <h3>User</h3>
    <p>Users timezone: <?php global $SESS; echo $SESS->userdata['timezone'] ; ?> ($SESS->userdata['timezone'])</p>
    
    <p>Users Time:<?php global $LOC; echo $LOC->set_human_time(); ?> ($LOC->set_human_time();)<br />
    

    Returns This:
    Server time zone: CDT
    Test of various time/date functions:
    Server
    PHP date: 17May10 08:59(echo date(‘dMy h:i’);)
    PHP gmdate: 17May10 01:59(echo gmdate(‘dMy h:i’);)
    Database dates(GMT/UTC)
    LOC now: held in db as 1274122764 which is 17May10 01:59 (date(‘dMy h:i’,$LOC->now);)
    User
    Users timezone: UM4 ($SESS->userdata[‘timezone’])
    Users Time:2010-05-17 09:59 AM ($LOC->set_human_time();)

    When I refresh the page immediately, I get this:
    Server time zone: CDT
    Test of various time/date functions:
    Server
    PHP date: 17May10 07:59(echo date(‘dMy h:i’);)
    PHP gmdate: 17May10 12:59(echo gmdate(‘dMy h:i’);)
    Database dates(GMT/UTC)
    LOC now: held in db as 1274122764 which is 17May10 12:59 (date(‘dMy h:i’,$LOC->now);)
    User
    Users timezone: UM4 ($SESS->userdata[‘timezone’])
    Users Time:2010-05-17 08:59 AM ($LOC->set_human_time();)

  • #4 / May 17, 2010 11:42am

    Sue Crocker

    26054 posts

    Rusty, have you upgraded to 1.6.9 yet?

  • #5 / May 19, 2010 1:01pm

    Rusty T.

    42 posts

    After two failed upgrades to 1.6.9, it is now installed and everything appears to be working.

    Thanks.

  • #6 / May 19, 2010 1:20pm

    Sue Crocker

    26054 posts

    Glad things are working again. Don’t hesitate to post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases