[Gambas-user] Problem with date chooser

Benoit Minisini gambas at ...1...
Tue Sep 19 22:42:16 CEST 2006


On Tuesday 19 September 2006 10:49, rolf wrote:
> Hi Benoit, hi everybody out there
>
> I use the date chooser from gambas 1.9.42 (running under debian testing) in
> a project and find out, that the choosen value, if printed from within a
> change event, alway is on day in the past.
>
> So is that a bug - so I have to wait for a fix - or is it a feature than I
> have to correct the value by myself.
>
> Thanks in advance
> Rolf
>

This is a stupid bug:

Instead of using Date(), I used CInt() thinking that I will get the days only, 
without the time. But this is true only on GMT+0, because Gambas stores date 
in GMT+0 format internally.

In other words, if you are in France, for example, 2006/09/19 is internally 
stored as 2006/09/18 23:00:00, and so using CInt() returns 2006/09/18. And so 
you lose on day.

I will fix it in the next version.

-- 
Benoit Minisini





More information about the User mailing list