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 behavior in entry dates

April 06, 2011 4:04pm

Subscribe [4]
  • #1 / Apr 06, 2011 4:04pm

    grrramps

    2219 posts

    Using this code the home page displays entries by date. If the entries are dated within an hour, only one date appears above the entries for that date. If the entry date of the latest entry is beyond an hour, then a date is displayed for the most recent entry, and a date is displayed for the other entries on the same date.

    Here’s the link.

    The top entry has an entry date of 2011-04-06 07:05 AM. The second entry is 2011-04-06 06:38 AM. The third entry is minutes earlier at 2011-04-06 06:26 AM. Other entries for the same day are within minutes of the second entry. So, multiple dates are displayed where only one day should display.

    The code:

    {exp:channel:entries channel="{mysite_channel_name}" orderby="date" sort="desc" limit="10" category="not 1" paginate="bottom"  disable="trackbacks|member_data|category_fields"}
    
    {date_heading}
    {entry_date format="%l, %F %j, %Y"}
    {/date_heading}
    
    {titlelink}<a href="http://{title_permalink=%22class=%22permalink" title="Permanent link on {mysite_site_name} to: {title}" class="permalink"> » </a>

    This is reproducible on another site.

    Localization is set to EDT for site and author.

  • #2 / Apr 07, 2011 2:04pm

    Sue Crocker

    26054 posts

    Hi, Ron.. 2.1.3 I presume? I’m going to test this in EE 2.1.4 beta to see if I can reproduce there.

  • #3 / Apr 07, 2011 2:24pm

    grrramps

    2219 posts

    [quote author=“Sue Crocker” date=“1302213866” I’m going to test this in EE 2.1.4 beta to see if I can reproduce there.

    Yes, 2.1.3. I have two sites with similar code and it’s the same on both.

    (BTW - I’ve adjusted the code to remove the extra date—I’ll put it back in if you want to see it).

  • #4 / Apr 07, 2011 2:25pm

    Sue Crocker

    26054 posts

    I can replicate this same problem in EE 2.1.4 beta.. I suspect it may be related to DST, but I’m going to log this as a bug for now. Thanks for reporting it, and giving exact dates to test the problem. Made it easier to test. 😊

    Link to bug report

  • #5 / Apr 07, 2011 2:40pm

    grrramps

    2219 posts

    I can replicate this same problem in EE 2.1.4 beta.. I suspect it may be related to DST…Link to bug report

    Thanks, Sue. That may also explain a similar problem in the archive tag. Sorry, I don’t remember the post, but archiving by month and year had some entries show up in, say, October, and then another October heading would appear (similar to the above, where two dates were the same, but only one should display) with the rest of the entries. The entries that would display in the first month heading were always the first two or three of the month.

  • #6 / Apr 07, 2011 3:43pm

    Sue Crocker

    26054 posts

    Yup. I remember that happening, and never did figure out what the issue was for that one. Hopefully one fix will fix both. Do you still have the dates for that scenario?

  • #7 / Apr 07, 2011 4:02pm

    grrramps

    2219 posts

    Do you still have the dates for that scenario?

    I’ve got the link.

    I’ve dumped the Year and Month archive because of that bug.

  • #8 / Apr 08, 2011 6:14pm

    Sue Crocker

    26054 posts

    Ron, I’m going to ask for your login details in an email in a few minutes.

  • #9 / Apr 13, 2011 3:40pm

    grrramps

    2219 posts

    Ron, I’m going to ask for your login details in an email in a few minutes.

    Provided last week. A good example is on the site now. Notice the two Wednesday date headings. The entries are separated by an hour.

  • #10 / Apr 14, 2011 11:21am

    Sue Crocker

    26054 posts

    Thanks, Ron. That’ll make it easier to escalate and show the dev team.

  • #11 / Apr 14, 2011 11:50am

    grrramps

    2219 posts

    That’ll make it easier to escalate and show the dev team.

    I can repeat the behavior on at least two sites, and manipulate it simply by changing the entry dates (more specifically, the entry times).

  • #12 / Apr 15, 2011 6:25pm

    Sue Crocker

    26054 posts

    I noticed this on your main page:

    {date_heading}
    {/date_heading} {assign_variable:default_site="noodlemac"}{assign_variable:template_group="mac"}

    but

    http://noodlemac.com/index.php/mac/updates/ doesn’t have the same problem.

  • #13 / Apr 15, 2011 7:10pm

    grrramps

    2219 posts

    I noticed this on your main page:

    {date_heading}
    {/date_heading} {assign_variable:default_site="noodlemac"}{assign_variable:template_group="mac"}

    but

    http://noodlemac.com/index.php/mac/updates/ doesn’t have the same problem.

    Sue, check again. The template in question is region_main_index in the default Channel. You’ll see the conditional:

    {categories}
    {if category_id == "2"}
    <div class="frame_news">
    {if "{current_time format='%z'}" == "{entry_date format='%z'}"}
    {date_heading}
    <div class="date">{entry_date format="%l, %F %j, %Y"}</div>
    {/date_heading}

    Both pages use the same code and the problem is on both. You’ll just need to scroll down a little. You’ll see two Friday entries on each page. The first set of Friday entries are time-stamped after 7:00 am, and the others are time stamped before 7:00 am.

    The last one, ExpanDrive, is time-stamped on Thursday but shows up on the Friday list. Times and dates are funkyrama.

  • #14 / Apr 16, 2011 8:13am

    Greg Salt

    3988 posts

    Hi grrramps,

    Okay, thanks for the update and thanks for your patience whilst this is investigated.

    Cheers

    Greg

  • #15 / Apr 20, 2011 2:30pm

    Brandon Jones

    5500 posts

    Hi grrramps,

    This should be fixed up in the next release as we were able to replicate on another installation. Thanks for your patience!

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

ExpressionEngine News!

#eecms, #events, #releases