Status/Resolution/Reason: Closed/Withdrawn/Duplicate
Reporter/Name(from Bugbase): Chris Phillips / Chris Phillips (cf_chris)
Created: 09/28/2012
Components: Language, Functions
Versions: 10.0
Failure Type: Data Corruption
Found In Build/Fixed In Build: Final /
Priority/Frequency: Critical / All users will encounter
Locale/System: English / Windows 7 64-bit
Vote Count: 6
Duplicate ID: CF-3309220
Problem Description: The variable returned from DateConvert("local2Utc",now()) seems to carry around the offset from local to UTC. When, you use that variable for just about anything (including cfqueryparam), the value you get back is off by the amount of the offset (i.e. back to the value you passed in).
Steps to Reproduce:
1) Assign the result of "DateConvert("local2Utc",now())" to a variable.
2) Use it in any number of functions or tags that deal with "time". (e.g. DateTimeFormat, TimeFormat, CreateODBCDate, cfqueryparam)
Actual Result: Instead of UTC time, it will be back to your machines local time.
Example:
<cfset date = DateConvert("local2Utc",now()) />
<p>#DateTimeFormat(date)#</p><!--- Differs by the amount of hours of offset to UTC. (Correct in CF9) --->
<p>#CreateODBCDateTime(date)#</p><!--- Differs by the amount of hours of offset to UTC. (Correct in CF9) --->
Expected Result:
I expect the results to match the last several version of Adobe CF.
Any Workarounds:
Call "toString()" on the result of "DateConvert("local2Utc",now())" before it is passed into any other time related function.
Example:
<p>#CreateODBCDateTime(date.toString())#</p><!--- Output is correct. --->
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3338974
External Customer Info:
External Company:
External Customer Name: cf_chris
External Customer Email:
External Test Config: My Hardware and Environment details:
Version ColdFusion 10,282913
Update Level 02
Operating System Windows 7
Update Level /I:/ColdFusion/InstanceA1/lib/updates/hf1000-3332326.jar
Attachments:
- September 29, 2012 00:00:00: 1_CF10DateErrors.cfm
- October 09, 2012 00:00:00: 2_CF10DateErrors-2.cfm
Comments: