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.

Edit date being submitted incorrectly and displaying on site incorrectly

September 07, 2012 11:52am

Subscribe [1]
  • #1 / Sep 07, 2012 11:52am

    Stephen T

    127 posts

    I’m running EE 2.5.2.

    I have the “Allow members to set their own localization preferences?” setting set to “No” in the CP, the server time zone is set correctly and I have “Daylight Savings Time” set to “Yes”.

    Here’s what’s happening:

    I’m trying to display a label on an entry if that entry has been edited.  This is the code I’m using:

    <span class="label">Edited</span> {edit_date format="%F %j, %Y at %g:%i %a"}

    This works well if the entry actually has been edited - the label and the edit date are show correctly.

    The problem is that this doesn’t work if the entry has NOT been edited because the edit date, for some reason, is actually showing up as being 5 hours before the entry date.  So, for example, if I have an entry that was submitted on 9/7 at 9:32 AM, and that entry has never been edited, the edit date is showing up as being on 9/7 at 4:32 AM.

    I took a look at the exp_channel_titles table and it looks like when an entry is initially submitted, the edit_date is marked as being 5 hours after the entry_date. So if the entry is submitted at 10:37, this is what gets stored in the table: 20120907153730. However, the display on the front end is shown as actually being the same as the entry_date.

    Once I actually edit the entry, the edit_date in the exp_channel_titles is set to the correct time the entry was edited, but it still displays on the site as being 5 hours earlier than the time that is actually in that field in the table.

    Does that make any sense?

    Thanks for your help.

  • #2 / Sep 10, 2012 11:43am

    Dan Decker

    7338 posts

    Hi Stephen,

    I wasn’t able to replicate this. so it looks like we might need a look first-hand.

    Be on the lookout for an email from EllisLab!

    Cheers,

  • #3 / Sep 13, 2012 12:18pm

    Kevin Smith

    4784 posts

    This one was caused by a bug, which is now reported and squashed! Have a look at the bug report for a fix.

    Thanks Stephen!

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

ExpressionEngine News!

#eecms, #events, #releases