Tony

Setting my system time to a US time zone then datediff works correctly.

Change it to NZ time (which is -12 hours UTC) and problem is there.

Adding UTC offset to second date works consistently but is a hassle -
especially given it worked fine in 6.0

Johan


----- Original Message ----- 
From: "Tony Weeg" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, August 21, 2003 3:36 PM
Subject: RE: DateDiff() broken in 6.1 (Bug?)


> here is what i get...
>
> 1. {ts '2003-05-01 00:00:00'} - {ts '2003-10-01 00:00:00'} = 153
> 2. {ts '2003-05-01 00:00:00'} - {ts '2003-10-02 00:00:00'} = 154
> 3. {ts '2003-05-01 00:00:00'} - {ts '2003-10-03 00:00:00'} = 155
> 4. {ts '2003-05-01 00:00:00'} - {ts '2003-10-04 00:00:00'} = 156
> 5. {ts '2003-05-01 00:00:00'} - {ts '2003-10-05 00:00:00'} = 157
> 6. {ts '2003-05-01 00:00:00'} - {ts '2003-10-06 00:00:00'} = 158
> 7. {ts '2003-05-01 00:00:00'} - {ts '2003-10-07 00:00:00'} = 159
> 8. {ts '2003-05-01 00:00:00'} - {ts '2003-10-08 00:00:00'} = 160
> 9. {ts '2003-05-01 00:00:00'} - {ts '2003-10-09 00:00:00'} = 161
> 10. {ts '2003-05-01 00:00:00'} - {ts '2003-10-10 00:00:00'} = 162
> 11. {ts '2003-05-01 00:00:00'} - {ts '2003-10-11 00:00:00'} = 163
> 12. {ts '2003-05-01 00:00:00'} - {ts '2003-10-12 00:00:00'} = 164
> 13. {ts '2003-05-01 00:00:00'} - {ts '2003-10-13 00:00:00'} = 165
> 14. {ts '2003-05-01 00:00:00'} - {ts '2003-10-14 00:00:00'} = 166
> 15. {ts '2003-05-01 00:00:00'} - {ts '2003-10-15 00:00:00'} = 167
> 16. {ts '2003-05-01 00:00:00'} - {ts '2003-10-16 00:00:00'} = 168
> 17. {ts '2003-05-01 00:00:00'} - {ts '2003-10-17 00:00:00'} = 169
> 18. {ts '2003-05-01 00:00:00'} - {ts '2003-10-18 00:00:00'} = 170
> 19. {ts '2003-05-01 00:00:00'} - {ts '2003-10-19 00:00:00'} = 171
> 20. {ts '2003-05-01 00:00:00'} - {ts '2003-10-20 00:00:00'} = 172
> 21. {ts '2003-05-01 00:00:00'} - {ts '2003-10-21 00:00:00'} = 173
> 22. {ts '2003-05-01 00:00:00'} - {ts '2003-10-22 00:00:00'} = 174
> 23. {ts '2003-05-01 00:00:00'} - {ts '2003-10-23 00:00:00'} = 175
> 24. {ts '2003-05-01 00:00:00'} - {ts '2003-10-24 00:00:00'} = 176
> 25. {ts '2003-05-01 00:00:00'} - {ts '2003-10-25 00:00:00'} = 177
> 26. {ts '2003-05-01 00:00:00'} - {ts '2003-10-26 00:00:00'} = 178
> 27. {ts '2003-05-01 00:00:00'} - {ts '2003-10-27 00:00:00'} = 179
> 28. {ts '2003-05-01 00:00:00'} - {ts '2003-10-28 00:00:00'} = 180
> 29. {ts '2003-05-01 00:00:00'} - {ts '2003-10-29 00:00:00'} = 181
> 30. {ts '2003-05-01 00:00:00'} - {ts '2003-10-30 00:00:00'} = 182
> 31. {ts '2003-05-01 00:00:00'} - {ts '2003-10-31 00:00:00'} = 183
>
> hth ... tony
>
> -----Original Message-----
> From: Johan Steenkamp [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 20, 2003 8:50 PM
> To: CF-Talk
> Subject: DateDiff() broken in 6.1 (Bug?)
>
>
> Can anyone else confirm that the datediff() function is broken in MX 6.1
> compared with 6.0?
>
> Simple test (code below) - output will show two consecutive dates with a
> difference of  157 days i.e:
> ...
> 156
> 157
> 157
> 158
> ...
>
> where it should be
> ...
> 156
> 157
> 158
> 159
> ...
>
> Problem not evident on 6.0 (Windows or Linux).
>
>
> <!--- test code --->
> <cfset year = 2003>
>
> <cfset date1 = createdatetime(year,5,1,0,0,0)>
>
> <cfloop index="i" from="1" to="31">
>  <cfset date2 = createdatetime(year,10,i,0,0,0)>
>  <cfoutput>#i#. #date1# - #date2# =
> #datediff("d",date1,date2)#</cfoutput><br>
> </cfloop>
>
>
> --------------------------------------------
> Johan Steenkamp
> www.assetnow.com
> --------------------------------------------
>
>
>
> 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Reply via email to