tracker issue : CF-3328875

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

TimeFormat Function Bug w/Local2Utc

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/Duplicate

Reporter/Name(from Bugbase): Dave Cordes / Dave Cordes (Dave Cordes)

Created: 09/11/2012

Components: Language

Versions: 10.0

Failure Type:

Found In Build/Fixed In Build: Final /

Priority/Frequency: Major / All users will encounter

Locale/System: English / Win 2008 Server R2 64 bit

Vote Count: 0

Duplicate ID:	CF-3323800

Problem Description: Formatting a date/time string using the Local2Utc function reverts to the local server time.

Steps to Reproduce:

<!--- Set local time --->
<cfset LocalTime = DateConvert("Local2Utc",Now())>

<!--- Set timestamp --->
<cfset Timestamp = "#DateFormat(LocalTime,'yyyy-mm-dd')#T#TimeFormat(LocalTime,'HH:mm:ss')#.00Z">

<p><cfdump var="#LocalTime#"></p>
<p><cfdump var="#Timestamp#"></p>

Actual Result:

Actual result for the timestamp variable is local date/time and not a UTC date/time.

Expected Result:

I expected a date/time variable in UTC format.

Any Workarounds:

I have not found any workarounds because the function itself is not working.

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3328875

External Customer Info:
External Company:  
External Customer Name: davecordes
External Customer Email:  
External Test Config: My Hardware and Environment details:

Windows Server 2008 / ColdFusion 10 Standard


  1. September 11, 2012 00:00:00: 1_Screen_Shot_2012-09-11_at_8.51.09_AM.png


Here is a potential workaround using the Mid() function. <cfset Timestamp = "#Mid(LocalTime,6,10)#T#Mid(LocalTime,17,8)#.00Z">
Comment by External U.
18102 | September 11, 2012 08:56:52 AM GMT