[Gambas-user] Date(Now) with time component under Ubuntu?

Rolf-Werner Eilert rwe-sse at osnanet.de
Tue Dec 4 12:25:27 CET 2018


Am 04.12.18 um 11:25 schrieb Tobias Boege:
> On Tue, 04 Dec 2018, Rolf-Werner Eilert wrote:
>> This has appeared in another program of mine, and it seems to be a general
>> issue with date strings. Now on a DateChooser, I not only get back a day -1
>> but also with a time string of 23:00:00. So instead of "12-04-2018" I get
>> "12-03-2018 23:00:00".
>>
>> I would guess it has to do with Gtk vs Qt, but can it be fixed other than
>> waiting for errors and adapting Gambas code?
>>
> 
> I had hoped someone more knowledgeable would have answered by now,
> but here is what I think: there are actually no time-less dates in
> Gambas. When you put a normal Date (with time component) through
> the Date() function, you get a Date back which always has its time
> component zeroed out. My guess is that the data your program deals
> with didn't change between the two distros, but something in the
> way it is displayed has --- Gambas version, toolkit, locale, ...?
> 
> Disclaimer: not a date specialist. It may be wrong what I said above
> about time-less dates not existing, but FWIW the GB_DATE structure
> in main/share/gambas.h has a `date` and a `time` member. You can set
> one to zero and treat that as a special value, but you can't get
> rid of it.
> 
> Regards,
> Tobi
> 


Thank you for this answer, it explains at least part of the hassle. 
Under my older system, Date(Now) in fact only delivered the date part, 
no time part. But this could be solved easily.

This morning I found another, more severe "issue", described some hours 
ago. How shall I deal with that? It actually makes a lot of things being 
messed up here...

Regards
Rolf



More information about the User mailing list