> This fails randomly:
>
> If DateDiff(Now, DateAdd(Date(Now), gb.Day, 2), gb.Day) <> 2 Then
> Return 160
> Endif
>
> Though, today with new revision (3299) I haven't be able to reproduce it.
> I'll look it more closely later.
>

OK, now it fails again.

If DateDiff(Now, DateAdd(Date(Now), gb.Day, 2), gb.Day) <> 2 Then
Debug Now
Debug DateAdd(Date(Now), gb.Day, 2)
Debug DateDiff(Now, DateAdd(Date(Now), gb.Day, 2), gb.Day)
Return 160
Endif

mTest.DoTests.842: 17/11/2010 22:08:38
mTest.DoTests.843: 19/11/10
mTest.DoTests.844: 1


More...


? now
17/11/2010 22:10:53

? date(now)
17/11/10

? date(2010,11,17,22,11,33)
17/11/2010 22:11:33


So, it seems that date command doesn't always like "now".
This seems to happen only at evenings.

Jussi
Gambas 3 rev 3299 @ Ubuntu 10.04 64bit
------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today
http://p.sf.net/sfu/msIE9-sfdev2dev
_______________________________________________
Gambas-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/gambas-user

Reply via email to