[Gambas-user] DataChooser behaves differently on different systems

Admin admin at allunix.ru
Mon Aug 17 11:04:41 CEST 2020


17.08.2020 15:06, Gianluigi пишет:
>
>
> Il giorno lun 17 ago 2020 alle ore 05:25 Admin <admin at allunix.ru 
> <mailto: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
>
I don't get how this is a bugfix. The documentation states:
Date    Returns a date without its time component
Yet I get some random time with a date when I print a date.


> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----


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


More information about the User mailing list