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:ac8:4253:: with SMTP id r19mr36539434qtm.116.1588188013836; Wed, 29 Apr 2020 12:20:13 -0700 (PDT) X-Received: by 2002:a9d:6315:: with SMTP id q21mr28381120otk.16.1588188013549; Wed, 29 Apr 2020 12:20:13 -0700 (PDT) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!aioe.org!peer02.ams4!peer.am4.highwinds-media.com!news.highwinds-media.com!tr1.eu1.usenetexpress.com!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 29 Apr 2020 12:20:13 -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> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <9dad342a-7981-4d09-a414-7cec651097ac@googlegroups.com> Subject: Re: Getting the 3 letter time zone abbreviation From: Bob Goddard <1963bib@googlemail.com> Injection-Date: Wed, 29 Apr 2020 19:20:13 +0000 Content-Type: text/plain; charset="UTF-8" X-Received-Bytes: 2333 X-Received-Body-CRC: 1963100938 Xref: reader01.eternal-september.org comp.lang.ada:58525 Date: 2020-04-29T12:20:13-07:00 List-Id: On Wednesday, 29 April 2020 10:09:39 UTC+1, Dmitry A. Kazakov wrote: > On 2020-04-29 10:46, Bob Goddard wrote: > > I'm sure this has been asked many times... > > > > I need to get the 3 letter time zone abbreviation. > > 3-4 you mean, e.g. CEST. > > > Does anyone have code that can do that? > > I had only a partial success. I used GTK/GLib time zone functions. The > abbreviation of the zone name is the thing. Unfortunately it works > poorly under Windows, and Windows updates tend to break time zone > settings [*] I needed to plant various fallback to deduce the zone from > UTC offset. > > Anyway, Ada bindings are here: > > http://www.dmitry-kazakov.de/ada/gtkada_contributions.htm#5.14 > > ----------- > * I believe it was the case why one could not log into Origin account > for a couple of days not so long ago. Their server verified the time > zone and blocked access because Windows reported garbage. Seems easier just to import strftime and call it requesting just "%Z". This is on Linux, but MS suggests it should also work on Windows. B