tracker issue : CF-4198173

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

WDDX Serialization of date objects is broken

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/Duplicate

Reporter/Name(from Bugbase): Sean Coyne / Sean Coyne ()

Created: 12/09/2016

Components: Language, WDDX Serialization

Versions: 2016

Failure Type: Data Corruption

Found In Build/Fixed In Build: 2016.0.03.300466 /

Priority/Frequency: Normal / All users will encounter

Locale/System: English / Win 2012 Server x64

Vote Count: 1

Problem Description:

If you serialize an date object to WDDX then back to CFML it does not return the correct date

Steps to Reproduce:

run code in attached file (tried to put the code here but kept getting an error when submitting the bug)

Actual Result:

before: {ts '2016-10-14 23:45:00'}
after: {ts '2016-10-15 00:45:00'}

Expected Result:

same date/time before and after serialization

Any Workarounds:

if the date is converted to a string first it seems to serialize/deserialize correctly, but date objects do not work

Attachments:

  1. December 09, 2016 00:00:00: cfwddx_bug.cfm.zip

Comments:

I've found this happens when you have your server set to a non-UTC timezone. We have ours set to EST. It also happens with other date functions such as parseDateTime().
Comment by Sean C.
1422 | December 20, 2016 02:34:37 PM GMT
This is causing some serious problems for many of our applications.
Vote by Jeff C.
1424 | January 02, 2017 09:50:52 PM GMT
TC works fine with time zone selected as (UTC-05:00) Eastern Time (US & Canada) as well. This must be duplicate of CF-4198336 (which is fixed now) Withdrawing the bug.
Comment by Nitin K.
1423 | February 04, 2018 10:34:11 AM GMT