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

Gianluigi bagonergi at gmail.com
Thu Dec 6 18:59:06 CET 2018


You nust not have to mix the functions that locate (Date, Str, Val) with
those that do not locate (CDate, CString).
"Date" takes away the time part.

Regards
Gianluigi

Il giorno gio 6 dic 2018 alle ore 18:21 Rolf-Werner Eilert <
rwe-sse at osnanet.de> ha scritto:

> Am 06.12.18 um 14:22 schrieb Benoît Minisini:
> > Le 06/12/2018 à 13:03, Rolf-Werner Eilert a écrit :
> >> Yes Bruce,
> >>
> >> I didn't realize before I ran into this, but as far as I understand now
> >>
> >> CStr(Now) should be local date + time
> >> Str(Now)  should be UTC
> >>
> >
> > No, it's the contrary!
> >
>
> Ah yes, sorry, I see... :)
>
> In both cases you get today's date (now 6th December), but if you
> convert Date(Now) to a string, this is what you get:
>
>
> CStr(Date(Now)) becomes yesterday's date + zero time -1 hour "12/05/2018
> 23:00:00"
> Str(Date(Now)) becomes today's date + zero time "06.12.2018 00:00:00"
>
> Strange, isn't it?
>
> Regards
> Rolf
>
>
> ----[ Gambas mailing-list is hosted by https://www.hostsharing.net ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20181206/282070f4/attachment-0001.html>


More information about the User mailing list