bug-gawk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: use of TZ by mktime()/strftime()


From: Ed Morton
Subject: Re: use of TZ by mktime()/strftime()
Date: Wed, 10 Aug 2022 11:33:51 -0500
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.1.0

On 8/10/2022 10:56 AM, Eli Zaretskii wrote:
From:arnold@skeeve.com
Date: Wed, 10 Aug 2022 08:50:07 -0600

Ed Morton<mortoneccc@comcast.net>  wrote:

So in the above setting TZ to EST or UTC worked and specifying IST at
the end of the timestamp worked, but setting TZ to IST failed just like
it does in gawk. Clearly I'm missing something...
All of this depends on the underlying C library.  As far as I know
there aren't standardized time zone names that work the same
everywhere.
Actually, there are, at least in most practical cases.  But they are
very few, and you cannot rely on their DST rules to be up to date with
the current practices; they might on some systems still reflect the
DST rules of many years ago, or even work according to the rules of
another country.


FWIW I found some information on "standard" time zones:

The IANA Time Zone Database:

   https://www.iana.org/time-zones
   
https://vdc-repo.vmware.com/vmwb-repository/dcr-public/790263bc-bd30-48f1-af12-ed36055d718b/e5f17bfc-ecba-40bf-a04f-376bbb11e811/timezone.html
   https://en.wikipedia.org/wiki/List_of_tz_database_time_zones

The ISO 8601 standard:

   https://en.wikipedia.org/wiki/ISO_8601
   https://www.iso.org/iso-8601-date-and-time-format.html

Thanks for the feedback all, looks like gawk behaves the same as date wrt TZ environment values so there's no gawk issue.

    Ed.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]