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.

Odd issues with date and time

January 19, 2011 4:15pm

Subscribe [9]
  • #1 / Jan 19, 2011 4:15pm

    Stephen T

    127 posts

    I’m running EE 2.1.3 build 20101220.  I’ve been having some odd issues with times in my entry dates and expiration dates that I was hoping the upgrade from 2.1.2 to 2.1.3 would fix, but it hasn’t fixed it and I’m noticing some other odd issues.

    I have an events channel where I’m using the entry date and expiration date to control how the events are listed on the site.  So the entry date needs to be set to 12:00 AM on the date the event starts and the expiration date needs to be set to 11:59 PM on the day the event is concluded.  So I’ve been setting the dates and times manual for each entry - choosing the date and then typing in the time to 12:00 AM or 11:59 PM.

    I’ve double checked my localization settings both for the site and under my member preferences.  They are set correctly to CST and the “Daylight Savings Time” option is set to “No”.  I also checked my server time and it is also set to the correct time.

    A couple of issues:

    1) Sometimes the time jumps forward one hour for both the entry date and expiration date, and other custom date fields on the same entry.  This can cause some big problems because than the date ends up wrong on the site since jumping forward one hour on the expiration date bring you to the next day.  This happens most of the time, but not all of the time.  I haven’t been able to identify any pattern for when it works and when it doesn’t work.  Sometimes it will jump forward every time I edit the entry and then all of a sudden stop jumping forward the next time I edit it.  Sometimes it will never jump forward for an entry at all.

    2) There have been a few instances where I have edited the entry and the time jumps backwards by 1 minute.  This only happened a few times and I couldn’t figure out anything unique with those entries that would cause this either.

    I know there were some issues with localization previously, but I’ve double checked all of my settings and can’t figure out what I need to do here.  If it was consistent one way or the other, then I could know that I always need to set the time one hour earlier than I actually want it to appear.

    Let me know if you need any other information and thanks for your help.

  • #2 / Jan 19, 2011 7:37pm

    bthx79

    9 posts

    Hello,

    I am having the exact same issue on my EE install.  2.1.3.  I have an events channel and I periodically encounter time errors.  For example, i try to create an event with an entry date starting at 7 pm and expiration date ending at 9pm, I submit the entry and when I view the result on the rendered page, the time has jumped to 8pm to 10pm.  I go back to re-edit the entry and sure enough the time has jumped ahead exactly one hour.  It does not do this on every entry which seems odd to me.

    Thanks in advance for any insight into the matter.

    Best Regards

  • #3 / Jan 20, 2011 8:58am

    Sue Crocker

    26054 posts

    Hi, Stephen and bthx79.

    Are you logged into the site when you attempt to view the items on the front end?

    Are you using any third party add-ons? If so, which ones?

  • #4 / Jan 20, 2011 11:36am

    Stephen T

    127 posts

    Hi Sue,

    Sometimes I’m logged into the front end and sometimes I’m not.  Other site visitors (just visitors, not EE users) usually end up sending me an email when the date for an event is off due to the time jumping forward, so I know that they are seeing the issue as well.

    The only add-on I’m using in my events channel is Matrix.  I think I noticed this earlier on another channel that wasn’t using Matrix, but can’t recreate it now.  Here’s a list of all the third party modules and extensions I have installed:

    Modules

      * Freeform
      * Wygwam
      * Safecracker
      * Likee
      * Mx Tool Box
      * Reelocate
      * Ajw Datagrab

    Extensions

      * Low Seg2cat
      * Matrix
      * Pt Field Pack
      * Draggable
      * Safecracker
      * Mx Title Control
      * Deviant

    Let me know if I can provide any more info.

  • #5 / Jan 20, 2011 3:51pm

    Stephen T

    127 posts

    I just noticed another issue with this that I wanted to let you know about.  It seems like the entry time on some past entries that were created in earlier versions of EE (2.1.2 and 2.1.1) has been jumping back one or two hours instead of forward.  So some older entries I created that had an entry date and time of 12/18/2010 at 12:00 AM have actually shifter to 12/17/2010 at 10:00 PM or 12/17/2010 at 11:00 PM.  These entries have not been touched at all since upgrading to 2.1.3, but the time seems to have jumped back anyways.  I can go into these entries and correct the date and time and sometimes they stay the same as what I entered, but sometimes they jump forward one hour after I hit submit.  In this case, it seems like the entries that were created when Daylight Savings Time was in effect are the ones that are jumping forward after I hit submit, but that doesn’t seem to apply to the other entries that I mentioned in my first post that were jumping ahead one hour.

    This time issue is really concerning me for our events channel because communicating the wrong date for our events could cause some pretty big issues in our organization.  Any clue of how I can make sure the date and time I enter for the entry and expiration dates stays exactly as I entered it?

  • #6 / Jan 21, 2011 3:15am

    John Henry Donovan

    12339 posts

    Steven,

    Did you perform a data import at some stage? If so could you give us some background on it?

  • #7 / Jan 21, 2011 11:05am

    Stephen T

    127 posts

    Sure.  I did perform a data import a little over a month ago using the DataGrab add-on.  It was for a different channel that contains a list of plays.  All I did was import a csv file with the names of the plays, authors, and a couple of other pieces of information into a channel where each entry contains the information for one play.  That’s the only channel I’ve imported data for and there weren’t any issues with it.

    Any other info I can provide?

    Thanks again for your help.

  • #8 / Jan 21, 2011 5:37pm

    Sue Crocker

    26054 posts

    Hi, Stephen.

    We’re seen some weird things happen with dates input in earlier versions.

    If you take a single entry that is wrong, delete or rename it, the put in a brand new entry with the same data, does *that* work?

  • #9 / Jan 21, 2011 5:57pm

    Stephen T

    127 posts

    Hi Sue,

    I just tried deleting several old entries, then putting in brand new entries with the same data and here’s what I found.

    1) First I deleted an event that had the wrong time from September 15, 2010 (which was when Daylight Savings Time was active) then re-added that same event putting the entry date as 09/15/2010 12:00 AM and the expiration date as 09/15/2010 10:00 PM.  After I hit submit to create the event, the entry date showed up as 09/15/2010 01:00 AM and the expiration date was 09/15/2010 11:00 PM.  So it was still jumping ahead one hour.

    2) Thinking that it may just have to do with the entry dates from when Daylight Savings Time was active, I deleted a future event that does not occur during Daylight Savings Time.  This event had an entry date of 03/03/2011 at 12:00 AM and an expiration date of 03/05/2011 at 11:59 PM.  When I submitted this event, the time stayed as I had entered it - there was no one hour jump ahead.

    3) To test further, I created a new future event that takes place when Daylight Savings Time is in effect.  Daylight Savings Time starts in the US on March 13, 2011, so I set the entry date for this event to 03/14/2011 12:00 AM.  When I hit submit, this event DID jump ahead one hour after I hit submit.

    So it would definitely seem to me to somehow be tied to Daylight Savings Time, but beyond that I have no idea how it’s happening.

    Thanks!

  • #10 / Jan 21, 2011 8:34pm

    bthx79

    9 posts

    Hello,

    Stephen is right on track with this date/time bug and its relation to daylight savings time.  I have an events channel and all of my date/time entries are correct before March 13th 2011.  Any date/time entered after March 13th 2011 result in one hour being added.

    The only way i have been able to work around it is manually offsetting the time on entry.  For example, If I want my entry to be 7:00pm to 9:00pm I have to enter it as 6:00pm to 8:00pm for any dates after March 13th.  The weird thing is that when I go in to edit the same entry, it now shows the right time - 7 to 9 pm in the entry date tab.

    I am using the latest version of EE 2.1.3 20101220
    I started from scratch with the latest build 20101220, no upgrades were performed.
    No data imports were performed.

    The following Add-On modules are installed:
    MX Google Maps 1.3.0
    REElocate 1.1
    jQuery Module 1.0

    Accessories Installed
    Draggable 1.2
    Editee 1.0.4

    Extensions Installed
    Draggable 1.2
    EE Hive - Entry Lottoree 1.0
    Minimee   Settings 1.0.2
    P&T Field Pack 1.0.3

    Plugins Installed
    CE Image 1.5  
    Human Filesize 1.1.1  
    Magpie RSS Parser 1.3.5  
    Minimee 1.0.2  
    MX Mobile Detect 2.4  
    XML Encode 1.3

    This bug may not be related to any specific add-on as I was able to replicate the issue on a “Vanilla” install of EE 2.1.3 20101220.  With no additional modules or plugins installed.  My web host is Rackspace - Cloud Sites in case it becomes a host-specific issue.

    It’s not slowing me down all that much, since I have been able to work around it without any problems.

    Thanks again for your insight and discussion into this.

    Best Regards,

    Brian-

  • #11 / Jan 23, 2011 3:23pm

    Greg Salt

    3988 posts

    Hi Stephen and bthx79,

    I believe that what you are experiencing for new entries is ‘correct’ behaviour in that EE does properly adjust your entry dates for when the DST changes are in effect but then your times are not ‘fixed’ as you may expect. Are your times jumping when edited? Stephen please clarify the situation for your older entries that were added before you upgraded to version 2.1.3.

    Cheers

    Greg

  • #12 / Jan 23, 2011 4:02pm

    bthx79

    9 posts

    Hello Greg,

    Thanks for your insight into this. 

    When I create a future entry after March 13th, as long as I add one hour to the entry and expiration date, then the correct time is displayed on the post.  For example if I want it to display 9am to 10am, I enter it as 8am to 9am.

    If I go back to edit the post, the entry and expiration date fields show the correct time (9am-10am).  However, if I edit the post and submit it, the entry and expiration times jump ahead one hour.  (10am-11am).  Each time the entry is edited and submitted, another hour is added. 

    So I am finding that if I plan to edit an entry and submit it, I have to again manually offset the time one hour on both the entry and expiration in order for it to appear correctly.

    Another issue pops up every now and then similar to what Stephen mentioned.  If I enter a time in the entry and expiration field say 9:00 AM - 10:00 AM,  sometimes it appears as 9:59 AM - 10:59 AM in the post.  This happens every few dozen posts and I can’t seem to replicate it or find the root cause.

    I wonder if this will continue after March 13th, or if it will accept the date as entered without any manual offsetting.  I have DST turned off in the localization setting in the control panel.  Although this may be a normal functionality of EE and not considered a bug per se, I do find it a little strange that the time is not fixed when entered for future events. It is also strange that the time jumps one hour every time I edit an entry.  Although I’m not finding any issues offsetting the time manually in this case.

    Thanks again for the continued insight and discussion.

    Best Regards,

    Brian-

  • #13 / Jan 24, 2011 8:50am

    Sue Crocker

    26054 posts

    Brian and Stephen, I’m going to do some date testing on a clean 2.1.3 install and see if I can replicate the problem you’re having.

    I’ll be using CST for both the server and for me, since that’s my local install.

    I’ll also include adding an event that is after March 13th, and edit entries. I’ll be logged into the site as well.

    Brian and Stephen, are you logged into the site when you attempt to view the dates for these entries?

  • #14 / Jan 24, 2011 10:41am

    Stephen T

    127 posts

    Hi Greg and Sue,

    Thanks for continuing to look into this. Trying to explain to a non-technical user that if they are adding an entry that takes place during daylight savings time, or if they are even going back and editing an entry that took place during daylight saving time, that they need to go to the date tab and manually change the time to appear as if it’s going to be one hour earlier than it really should be is a bit difficult.

    Greg - I’m having the exact same issue as Brian explains above.  Every time I edit an entry that was during daylight savings or will be during daylight savings, the time jumps forward one hour.  This is happening both for new entries created in 2.1.3 and for older entries created in 2.1.1 and 2.1.2.  Occasionally I’ve seen the same issue as Brian where the time doesn’t jump forward one hour, but it jumps forward 59 minutes.

    Sue - Sometimes I’m logged into the site when I try to view the dates for these entries and sometimes I’m not.  Other site visitors (just visitors, not EE users) usually end up sending me an email when the date for an event is off due to the time jumping forward, so I know that they are seeing the issue as well.

  • #15 / Jan 25, 2011 6:47am

    John Henry Donovan

    12339 posts

    Can you please check your email

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

ExpressionEngine News!

#eecms, #events, #releases