[tz] Introduce Etc/UTC+x timezones?

Garrett Wollman wollman at csail.mit.edu
Fri Apr 21 18:42:39 UTC 2023


<<On Fri, 21 Apr 2023 12:10:39 -0600, Brian Inglis via tz <tz at iana.org> said:

> ISO 4031:1978 first defined the representation of local time differentials, 
> commonly referred to as time zones, with -W/+E.

> It appears POSIX +W/-E derives from SVID issue 1, published 1985 based on SVR2, 
> possibly in (commercial) AT&T Unix 5 or earlier, supporting GMT and US time 
> zones all positive.

> Anyone have access to earlier references to Unix time zones or TZ in sources?

Historically DST transition rules were compiled in to the C library.
In Seventh Edition Unix, the ftime(2) system call filled in a `struct
timeb` as follows:

struct timeb {
	time_t	time;
	unsigned short millitm;
	short	timezone;
	short	dstflag;
};

<https://github.com/dspinellis/unix-history-repo/blob/Research-V7-Snapshot-Development/usr/sys/h/timeb.h>

In later systems, there were actual comments:

struct timeb {
        time_t  time;                   /* seconds since the Epoch */
        unsigned short millitm;         /* + milliseconds since the Epoch */
        short   timezone;               /* minutes west of CUT */
        short   dstflag;                /* DST == non-zero */
};
[on my FreeBSD 12.4 system, because source compatibility]

So it's definitely been "west is positive" since V7.  Sixth Edition
does not appear to contain the ftime(2) system call, although its
source code structure is a lot less polished (there were still `ken`
and `dmr` directories) so I can't be entirely sure I've looked in all
the right places.

-GAWollman



More information about the tz mailing list