Status/Resolution/Reason: Closed/Withdrawn/UserError
Reporter/Name(from Bugbase): Jack Drysdale Jr / Jack Drysdale Jr ()
Created: 03/13/2018
Components: Language, DateTime Functions
Versions: 10.0
Failure Type: Data Corruption
Found In Build/Fixed In Build: 10,0,20,299202 /
Priority/Frequency: Normal / All users will encounter
Locale/System: ALL / Windows 10
Vote Count: 0
Problem Description: I cannot add two hours to a date object created with CreateDate(y,m,d). I can add one hour, I can add three hours, I can add four hours, but two hours will display as if three hours were added.
Steps to Reproduce:
<cfset aDate = CreateDate(2018,3,11) />
<cfset bDate = DateAdd('h',2,aDate) />
<cfset cDate = DateAdd('n',120,aDate) />
<cfset dDate = DateAdd('s',7200,aDate) />
<cfset zDate = DateAdd('h',4,aDate) />
<cfoutput>
#aDate# <!--- Will display as {ts'2018-03-11 00:00:00'} --->
#bDate# <!--- Will display as {ts'2018-03-11 03:00:00'} --->
#cDate# <!--- Will display as {ts'2018-03-11 03:00:00'} --->
#dDate# <!--- Will display as {ts'2018-03-11 03:00:00'} --->
#zDate# <!--- Will display as {ts'2018-03-11 04:00:00'} --->
</cfoutput>
Actual Result:
See "Steps to reproduce".
Expected Result:
Adding two hours to display as {ts'2018-03-11 02:00:00'}.
Any Workarounds:
None.
Attachments:
Comments: