TZ

環境変数 TZ (POSIX)

[2] 環境変数 TZ は、 Unixにおける日時時差の記述を指定するものです。

構文

[16] std offset [ dst [offset],start[/time],end[/time] ]

っていう書式らしい。夏時間の指定は実装が面倒だ。

offset は、地方時に offset だけ足したら UTC (協定世界時) になるってもの。 RFC 2822の日付形式とか多くの時差の記述の方法と符号が逆になるので注意。

  1. JST-9 (cf. RFC2822の日付形式では +0900)
  2. EST+5
  3. EST+5EDT

文脈

[19] いろいろな POSIX 対応アプリケーション環境変数TZ に従い動作します。

[20] POSIX に対応していないアプリケーションは、 POSIX 環境であっても不完全にしか対応していなかったり、 無視したりすることがあります。

[21] JavaPOSIX 環境で実行しても、完全には対応していないようです。

[22] 環境変数TZ の値の構文が他の場面で使われることもあります。

[5] POSIX時間帯の一部または全部を利用したもの

歴史

前史や API についてはUnixにおける日時

[1] POSIX and Olson time zone formats ( ()) http://www.ibm.com/developerworks/aix/library/au-aix-posix/

[3] Time::Zone - search.cpan.org () http://search.cpan.org/dist/TimeDate/lib/Time/Zone.pm

[4] PostgreSQL: Documentation: 9.6: Date/Time Types () https://www.postgresql.org/docs/current/static/datatype-datetime.html#DATATYPE-INTERVAL-INPUT

[6] T2EX () http://www.tron.org/ja/wp-content/themes/dp-magjam/pdf/specifications/ja/TEF020-S009-02.00.00_ja.pdf#page=107

[7] Document vestigial aspects of the POSIX API (eggert著, ) https://github.com/eggert/tz/commit/240c8d6e29e3069d72bec323910ee6800a6155d1

[8] Clarify extensions to POSIX model (eggert著, ) https://github.com/eggert/tz/commit/63d30205737f4ba165f2a3cebadee90a6651438f

[9] Clarify that EST5EDT is problematic in POSIX (eggert著, ) https://github.com/eggert/tz/commit/f7cef15920aa7ef2094dfd742c7fd54564046c8a

[10] [tz] [tz-announce] 2018f release of tz code and data available () https://mm.icann.org/pipermail/tz/2018-October/027058.html

[11] [tz] Please remove tzdata2018f () https://mm.icann.org/pipermail/tz/2019-February/027642.html

[12] RFC 8536 - The Time Zone Information Format (TZif) () https://tools.ietf.org/html/rfc8536#section-3.3.1

[13] [tz] Java & Rearguard () https://mm.icann.org/pipermail/tz/2019-June/028025.html

[14] [tz] Java & Rearguard () https://mm.icann.org/pipermail/tz/2019-June/028040.html

[15] 0001253: clarify that "alternative time" means tm_isdst is positive - Austin Group Defect Tracker () http://austingroupbugs.net/view.php?id=1253

[17] [tz] Extend POSIX TZ to allow transition times outside 00-24 range, permanent DST () https://mm.icann.org/pipermail/tz/2019-June/028050.html

[18] 0001252: Extend TZ to allow times outside 00-24 range, permanent DST - Austin Group Defect Tracker () http://austingroupbugs.net/view.php?id=1252

[23] [tz] More on EU/UK/Brexit clock changes () https://mm.icann.org/pipermail/tz/2020-February/028835.html

[24] [tz] Support for Etc/GMT -style zones ids with partial hours (, ) https://mm.icann.org/pipermail/tz/2020-October/029396.html