[Gambas-user] CDate Documentation

Jussi Lahtinen jussi.lahtinen at gmail.com
Tue Nov 15 03:46:18 CET 2022


This is related to what I have tried to explain several times. The date
datatype does not contain timezone information, UTC is always used
internally and what is shown is adjusted according to the currently used
timezone. Thus you can't get correct results like that. It does not work
like a paper calendar.


Jussi


On Tue, Nov 15, 2022 at 4:39 AM BB <adamnt42 at gmail.com> wrote:

> @ everyone
>
> Just in case everyone is cooling down, what's this?
>
> Public Sub Main()
>
>   Dim LunchDate As Date
>
>   LunchDate = Date(2023, 5, 1, 12, 30, 0)
>   Print Format(LunchDate, "ddd d mmm yy hh:nn t")
>
> End
>
> Outputs: *Mon 1 May 23 12:30 ACDT*
>
> Here in South Aus it is currently late spring and daylight savings is in
> use. The TZ abbrev is ACDT.
>
> But the 1st of May next year is NOT daylight saving time. It should print
> IMO *Mon 1 May 23 12:30 ACST*
>
> 😮
>
> b
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
>
> ----[ http://gambaswiki.org/wiki/doc/netiquette ]----
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20221115/261a3e70/attachment.htm>


More information about the User mailing list