tracker issue : CF-4204191

select a category, or use search below
(searches all categories and all time range)

CreateODBCDateTime() with DateFormat() and CreateODBCTime() results in incorrect ODBCDateTime output

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/Fixed

Reporter/Name(from Bugbase): Shannon E. / ()

Created: 04/18/2019

Components: Language, DateTime Functions

Versions: 2016,2018

Failure Type: Incorrectly functioning

Found In Build/Fixed In Build: 2016.0.10.314028 / CF2016U12,CF2018U5

Priority/Frequency: Critical / All users will encounter

Locale/System: / Win 2016

Vote Count: 0

Problem Description: When creating a ODBC DateTime string, if you Wrap a DateFormat() and CreateODBCTime() in a CreateODBCDateTime(), the Output is miscalculated. Currently This affects ColdFusion 2016 and ColdFusion 2018, Update level seems not to matter.

Steps to Reproduce: Set a Time value, and attempt to create an ODBC DateTime string, while using DateFormat() and CreateODBCTime() functions inside the CreateODBCDateTime().

Actual Result:
{ts '2089-05-20 00:00:00'}

Expected Result:
{ts '2019-04-18 00:00:00'}

Any Workarounds:
use TimeFormat() instead of CreateODBCTime(), Re-write with CreateDateTime() and specify each time segment with Year(), Month(), Day(), Hour(), Minute().



Tested CF2016 Update 11 and CF2018 Update 4, Not fixed as of 2019-07-01, will re-test the next time it's updated.
Comment by Shannon E.
30975 | July 01, 2019 03:10:43 AM GMT
Tested CF2016 Update 12, Appears fixed.
Comment by Shannon E.
31468 | September 29, 2019 10:47:04 PM GMT
Tested CF2018 Update 5, Appears fixed.
Comment by Shannon E.
31470 | September 30, 2019 04:29:25 AM GMT