[Gambas-user] DataChooser behaves differently on different systems

Gianluigi bagonergi at gmail.com
Mon Aug 17 10:06:40 CEST 2020


Il giorno lun 17 ago 2020 alle ore 05:25 Admin <admin at allunix.ru> ha
scritto:

> I noticed that my program that compares dates stopped working after an
> upgrade from Debian 9 to 10 (and therefore to Gambas 3.12.2).
>
> I also noticed it didn't work on some Kubuntu machine earlier but had no
> time to check why back then.
>
> Now I see it: on Debian 9 "print Date" returned my current local date
> without time component, which seems to be how the documentation says.
> Now it returns yesterday date and, suddenly, time, and it always is
> 17:00:00.
>
> DateChooser behaves the same way: on Debian 9 DataChooser.Value (in a
> DateOnly mode) returns the selected date. On Debian 10 in the same
> programm it returns yesterday date and time which is always 17:00:00
>
> In the same time "Now" correctly returns current local date and time on
> both systems.
>
> I need to create a universal code, but I cant figure out how to make
> DataChooser.value always return only date, as it does automatically on
> Debian 9.
>

>From gambas 3.10.0 things have changed: "CStr and CDate are now mutually
coherent, by internally converting to UTC dates only. Beware, this bug fix
is not backward-compatible!"

Here is an (initial) explanation from Benoit:
http://gambaswiki.org/wiki/doc/date

Regards
Gianluigi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20200817/84c29f60/attachment.html>


More information about the User mailing list