From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00,FREEMAIL_FROM, FROM_STARTS_WITH_NUMS autolearn=no autolearn_force=no version=3.4.4 X-Received: by 2002:a0c:c2d4:: with SMTP id c20mr6582905qvi.246.1588447517508; Sat, 02 May 2020 12:25:17 -0700 (PDT) X-Received: by 2002:a05:6830:1058:: with SMTP id b24mr8596272otp.16.1588447517163; Sat, 02 May 2020 12:25:17 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!news.gegeweb.eu!gegeweb.org!usenet-fr.net!proxad.net!feeder1-2.proxad.net!209.85.160.216.MISMATCH!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Sat, 2 May 2020 12:25:16 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=2001:8b0:ca:2:0:0:0:fd; posting-account=TiHetgoAAACluCgYkPc8-TWs6dBNgSne NNTP-Posting-Host: 2001:8b0:ca:2:0:0:0:fd References: <4f7d162e-356c-4cc4-abc3-f4cfe195b9cd@googlegroups.com> <9dad342a-7981-4d09-a414-7cec651097ac@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Getting the 3 letter time zone abbreviation From: Bob Goddard <1963bib@googlemail.com> Injection-Date: Sat, 02 May 2020 19:25:17 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:58557 Date: 2020-05-02T12:25:16-07:00 List-Id: On Saturday, 2 May 2020 16:38:43 UTC+1, Dmitry A. Kazakov wrote: > On 2020-05-02 17:08, Bob Goddard wrote: > > And apparently this will not work on non BSD/Linux system, as we need access to the external var tzname, which, if going by the similarly external errno, would require a small C program. > > > > Unless someone knows how to get access to arbitrary external vars. > > http://ada-auth.org/standards/12rm/html/RM-A-17.html > > > Still, there is no reason why this could not be implemented in GNAT. > > You can propose an AI for the incoming standard. RM-A-17 is for environmental vars, rather than external, ie library or system ones; Anyway, turns out Windows does not support the IANA 3/4 letter tz database. Calling tzset and examining the returned array, returns a string similar to "New Zealand Daylight Time". tzset, at least on Linux, and I assume every other unix type system which uses the tz data base does return the 3/4 letter tz name. Ho hum!