ColdFusion 2016: Bugfix for inconsistencies in date functions

Over the course of several months we identified some date/time issues that also exist in CF10 and CF11. In CF10 and CF11 there are still more inconsistency issues like in CF2016. Some of the date/time formatter and parser issues have been fixed in CF2016 RTM, but it was still a mess and the functions are not behaving as expected in many cases. We are still in discussion about incorrect IsNumericDate() results not listed below. Please also see ColdFusion 2016: Upcoming new IsDateObject() function that was a result of the issues we faced with below bugs.

Notable changes are:

DateTimeFormat "Mask" DateTime "string" Function CF2016 Updater 2 and before CF2016 Updater 3 and later
GetHttpTimeString Wed, 29 Jun 2016 12:07:45 GMT LSTimeFormat 2:07 PM 2:07:45 PM
    LSParseDateTime Wed, 29 Jun 2016 12:07:45 GMT is an invalid date or time string. {ts '2016-06-29 14:07:45'}
    LSIsDate NO YES
long June 29, 2016 2:07:45 PM CEST IsDate NO YES
iso 2016-06-29T14:07:45Z IsDate NO YES
"yyyy.MM.dd G 'at' HH:nn:ss z" DateTimeFormat(CreateDateTime(2016, 6, 29, 14, 7, 45), "yyyy.MM.dd G 'at' HH:nn:ss z") DateTimeFormat 2016.06.29 AD 'P' 14:07:45 CEST 2016.06.29 AD at 14:07:45 CEST
    ParseDateTime 2016.06.29 AD 'P' 14:07:45 CEST is not a valid date/time format. 2016.06.29 AD at 14:07:45 CEST is not a valid date/time format.
"yyyy-mm-dd'T'HH:nn:ss'Z'" DateTimeFormat(CreateDateTime(2016, 6, 29, 14, 7, 45), "yyyy-mm-dd'T'HH:nn:ss'Z'") DateTimeFormat 2016-06-29'P'14:07:45'+0200' 2016-06-29T14:07:45Z
    IsDate NO YES
    IsValid('date', var) NO YES
    ParseDateTime 2016-06-29'P'14:07:45'+0200' is not a valid date/time format. {ts '2016-06-29 16:07:45'}

History:

  • 2016/08/20: Received the 7th version of hotfix for 4165524 that finally seems working fine. Should be available with CF2016 Updater 3 or later.
  • 2016/09/12: We found a new bug with the patch. The timestamp provided as string to LSParseDateTime and LSTimeFormat is returned with +1 hour. Waiting for bugfix.
  • 2016/09/08: Received the 6th version of hotfix for 4165524.
  • 2016/06/17: Opened case with Adobe.

Rating
Average: 8.7 (6 votes)