Status/Resolution/Reason: Closed/Withdrawn/Duplicate
Reporter/Name(from Bugbase): Samuel Knowlton / Samuel Knowlton (Samuel Knowlton)
Created: 09/04/2012
Components: Language, Functions
Versions: 10.0
Failure Type: Incorrect w/Workaround
Found In Build/Fixed In Build: Final / 282898
Priority/Frequency: Major / All users will encounter
Locale/System: English / Win 2008 Server R2 64 bit
Vote Count: 3
Duplicate ID: CF-3309220
Problem Description: When converting a time to UTC using DateConvert, TimeFormat does not display the converted date correctly. DateTimeFormat(utcTime,"UTC") does.
Steps to Reproduce:
<cfset localTime=now()>
<cfset localUTC=dateconvert("local2Utc",localtime)>
<cfoutput>
<ul>
<li>local time is #localtime#</li>
<li>utc time is #localutc#</li>
<li>formatted utc is #timeformat(localUTC,"HHmmss")#</li>
</ul>
</cfoutput>
Actual Result:
Dumping the variable localutc correctly displays a UTC timestamp. Timeformat(localutc) displays the local (non-adjusted, non-UTC) time. This is new since CF8 (we upgraded from 8 to 10):
local time is {ts '2012-09-04 07:43:13'}
utc time is {ts '2012-09-04 12:43:13'}
formatted utc is 074313
Expected Result:
The formatted utc time should match the timestamp (in the above example, 12:43, not 07:43)
Any Workarounds:
Use DateTimeFormat(timestamp,"UTC") though this will probably be incorrect if/when the bug is fixed since it is re-converting it, right?
----------------------------- Additional Watson Details -----------------------------
Watson Bug ID: 3323800
External Customer Info:
External Company:
External Customer Name: Aquitaine
External Customer Email:
External Test Config: My Hardware and Environment details: Win 2008 R2 x64, CF10.
Attachments:
Comments: