tracker issue : CF-4207740

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

Incorrect Date Calculation When Using DateDiff()

| View in Tracker

Status/Resolution/Reason: Open//

Reporter/Name(from Bugbase): Dave L. / ()

Created: 03/31/2020

Components: Language, DateTime Functions

Versions: 2018

Failure Type: Data Corruption

Found In Build/Fixed In Build: ALL /

Priority/Frequency: Normal / All users will encounter

Locale/System: English / Windows 10 64 bit

Vote Count: 0

Problem Description:
ColdFusion improperly calculates the difference between two dates if the date is before 1970.

Steps to Reproduce:
writeDump( dateDiff( 'd', '6/1/1420', '12/31/1967' ) );

Actual Result:
199991

Expected Result:
200000

Any Workarounds:
Lucee 4.5 and 5.0 get the date math right. Perhaps they are using a different Java date math library?

Attachments:

Comments: