tracker issue : CF-4203350

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

DateTimeFormat returns different results in CF2016 and 2018

| View in Tracker

Status/Resolution/Reason: Open//

Reporter/Name(from Bugbase): Rolando de Guzman / ()

Created: 09/21/2018

Components: Functions, Datetime

Versions: 2016

Failure Type: Others

Found In Build/Fixed In Build: CF 2018 /

Priority/Frequency: Normal / All users will encounter

Locale/System: English / Windows 10 64 bit

Vote Count: 0

Problem Description:

I am using GetHttpTimeString() function to get the current date and time in UTC/GMT. But when I format it using DateTimeFormat, its returning different results.

Steps to Reproduce:
In CF2016, when I do this:
<cfdump var="#GetHttpTimeString()#">
<cfdump var="#DateTimeFormat(GetHttpTimeString(), "yyyy-mm-dd HH:nn:ss")#">

it will return:
Tue, 18 Sep 2018 17:44:27 GMT --> UTC
2018-09-18 17:44:27 --> still in UTC

In CF2018, the same code will return:
Tue, 18 Sep 2018 17:44:27 GMT --> UTC
2018-09-18 12:44:27 --> current date/time in my timezone

Unless I pass a third argument for the timezone, it will use the server's timezone by default.

I just want to know if is this an intentional change, if it is, I can't find anything in the 2018 Release Notes.

Thank you.

Ollie de Guzman



For the version, i selected 2016 since I there's no option for 2018 in the dropdown.
29732 | September 21, 2018 01:50:11 PM GMT