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.

True resolution to 201942, entry_date off by one minute

November 07, 2011 3:12pm

Subscribe [2]
  • #1 / Nov 07, 2011 3:12pm

    Mason N

    17 posts

    This question may be related to a resolved thread.

    Just wanted to post this in case anyone else came on this problem.  I feel a little silly that it never occurred to me before.

    To recap, I have a Safecracker form that specifies entry_date, and sometimes (1 out of 50?) it would have a time one minute earlier than the time I was attempting to set.  So if I had the entry:

    <input type="text" value="2011-10-13 12:00 PM" name="entry_date"/>

    It would work the majority of the time, but then occasionally set the time to 11:59 instead.  I thought this was fixed with my upgrade to 2.3.1, but turns out I was mistaken and after a couple of weeks it started happening again.  I’m not sure this is related, but I found this in the source code:

    // Are we fibbing?
      if ($fib_seconds === TRUE)
      {
       $time = $time - 1;
      }

    and it made me realize I wasn’t specifying seconds.  I changed the input to:

    <input type="text" value="2011-10-13 12:00:00 PM" name="entry_date"/>

    and now it seems to be truly fixed (crossing my fingers). 

    You can mark this resolved, just wanted it on record.

  • #2 / Nov 08, 2011 12:33pm

    Kyle Cotter

    730 posts

    Hey Mason,

    Glad to see you have hopefully put this issue to bed. Thanks for noting what you did here for the benefits of others.

    If you do in fact encounter anymore issues, please feel free to open a new thread.

    Thanks Mason!

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

ExpressionEngine News!

#eecms, #events, #releases