Date field is off by one

Steve Erickson's Avatar

Steve Erickson

04 Apr, 2011 01:28 AM via web

Hi, I'm having a problem with a date fields. I have a template that includes a date field. In the past I was able to enter mm/dd/yyyy as a string and then in my template parse that string using the date filter to convert it into human readable text. Recently the date being parsed and output by the template filter is one day different than the date that I am entering into my form. For example, if I put in 04/11/2010, then the my template outputs April 10, 2011. I'm not sure, what is going on. My timezone is set to Eastern on the site settings page. I haven't changed my site's code in months and this issue just started happening. Did you change something with the date filter? Thanks for the help.

  1. 2 Posted by Jonathan Hoyt on 04 Apr, 2011 01:32 AM

    Jonathan Hoyt's Avatar

    Looking into this and I'll get back with you as soon as possible.

  2. Support Staff 3 Posted by Steve Smith on 04 Apr, 2011 03:21 AM

    Steve Smith's Avatar

    I just deployed an update to fix this issue. We did make an update to the date filter to work with time zones, but were converting after the fact rather than before, so '04/11/2011' was parsed as the server time zone (GMT) then converted to eastern (-5) so it was setting the date back a day. I've updated so the date now parses in the correct time zone from the beginning, so your dates should be correct.

  3. 4 Posted by Steve Erickson on 04 Apr, 2011 11:47 AM

    Steve Erickson's Avatar

    Thanks guys. Everything looks great now.

  4. Jonathan Hoyt closed this discussion on 04 Apr, 2011 07:32 PM.

Comments are currently closed for this discussion. You can start a new one.

Recent Discussions

17 May, 2012 10:45 PM
20 Mar, 2012 05:05 PM
26 Apr, 2012 01:40 AM
07 Mar, 2012 04:42 PM