[Gambas-user] CDate Documentation

BB adamnt42 at gmail.com
Tue Nov 15 06:24:41 CET 2022


On 15/11/22 3:17 pm, Tobias Boege via User wrote:
> If we plan to meet N years
> from now, who knows if daylight saving will still be a thing? What if the
> time lords add another leap second [1]?

TZData (the website) is quite explicit on this, any "future" *tzdata* 
that does not exist in the database should be assumed to be the same as 
the "latest" data for that TZ. IOW the one with "max" in it.

So for here,

# South Australia
# Rule    NAME    FROM    TO    -    IN    ON    AT    SAVE    LETTER/S
Rule    AS    1971    1985    -    Oct    lastSun    2:00s    1:00    D
Rule    AS    1986    only    -    Oct    19    2:00s    1:00    D
Rule    AS    1987    2007    -    Oct    lastSun    2:00s    1:00    D
Rule    AS    1972    only    -    Feb    27    2:00s    0    S
Rule    AS    1973    1985    -    Mar    Sun>=1    2:00s    0    S
Rule    AS    1986    1990    -    Mar    Sun>=15    2:00s    0    S
Rule    AS    1991    only    -    Mar    3    2:00s    0    S
Rule    AS    1992    only    -    Mar    22    2:00s    0    S
Rule    AS    1993    only    -    Mar    7    2:00s    0    S
Rule    AS    1994    only    -    Mar    20    2:00s    0    S
Rule    AS    1995    2005    -    Mar    lastSun    2:00s    0    S
Rule    AS    2006    only    -    Apr    2    2:00s    0    S
Rule    AS    2007    only    -    Mar    lastSun    2:00s    0    S
Rule    AS    2008    max    -    Apr    Sun>=1    2:00s    0    S
Rule    AS    2008    max    -    Oct    Sun>=1    2:00s    1:00    D

any date after 2008 should use the 2008 rules.

But I agree with everything you are saying, the only "gripe" I have with 
the entire Gambas "Date" regime is that Format(fDate, "t" or "tt") gave 
me the wrong local timezone for a specific date.

It should return the timezone for that date, not simply the current 
timezone as seen in the Env[] value. Since Gambas does the subtraction 
to get its UTC value for the "date" then it should be able to figure out 
the DST/nonDST variant for a date. In fact it must have already have 
done that in order to do that subtraction.

AFAICS the "dates" are right, *Format* isn't.


b

(p.s. If my lunch isn't on time to the millisecond then words will be 
spoken! 😬)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20221115/c2962291/attachment.htm>


More information about the User mailing list