Login for more options
ColdFusion 10 fails to insert utc datetime in right format
Problem: ColdFusion 10 can't convert "#'utc Datetime with ODBC ' & utcDate#' in to the correct format while inserting in to the database.
1. Install ColdFusion 10 on machine with built-in server
2. Place the scribble.cfm page in side the ColdFusion 10 root folder
3. Run this page in the browser
Result: The utc time value gets changed after inserting in to the database. The created utcDate (2012-08-10 11:20:37) will be inserted as 2012-08-10 13:20:37. It seems that there is an implicit conversion.
Images of have been attached.
Expected: It shouldn't change, as it was working fine in ColdFusion 9.
|Platform(s)||Win XP All, Mac 10 All|
|Found In Build||282462|
|Fixed In Build||282877, 282898|
10:26:27 PM GMT+00:00 Dec 26, 2012
Just ran into this problem... trying to insert UTC date/time into sql server using this code:
rightNow = Now();
nowUTC = DateConvert("Local2UTC", rightNow);
crDateODBC = CreateODBCDateTime (nowUTC);
the variable nowUTC is correct, but crDateODBC show the local time.