tracker issue : CF-4203350

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

DateTimeFormat returns different results in CF2016 and 2018

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/Fixed

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

Created: 09/21/2018

Components: Language, DateTime Functions

Versions: 2018

Failure Type: Others

Found In Build/Fixed In Build: CF 2018 / 2018.0.02.312443

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

Attachments:

Comments:

For the version, i selected 2016 since I there's no option for 2018 in the dropdown.
Comment by Rolando d.
29732 | September 21, 2018 01:50:11 PM GMT
Fix is in the enclosed email attachment.  [^RE DateTimeFormat returns different results in CF2016 and 2018 (CF-4203350).msg] 
Comment by Anit K.
29846 | October 25, 2018 01:30:33 PM GMT