Skip to content

Commit 1398069

Browse files
committed
Use “timezone“ for timestamp histories
The POSIX standard uses the spelling “timezone”, and often uses it to mean a TZ setting that determines the past and predicted future of UT offsets, time zone abbreviations, and tm_isdst flags. In contrast, in popular usage by far the most common spelling is “time zone”, and it typically means a maximal geographic region of clocks that currently have the same standard time. As these two quite-different meanings are often confused, attempt to disambiguate things a bit by consistently using “timezone” for the former meaning and “time zone” for the latter. This affects documentation and a few diagnostic messages.
1 parent 6d02df8 commit 1398069

22 files changed

+200
-176
lines changed

Makefile

+11-11
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ BUGEMAIL= [email protected]
1919
# DATAFORM= rearguard
2020
DATAFORM= main
2121

22-
# Change the line below for your time zone (after finding the zone you want in
23-
# the time zone files, or adding it to a time zone file).
24-
# Alternatively, if you discover you've got the wrong time zone, you can just
22+
# Change the line below for your timezone (after finding the one you want in
23+
# one of the $(TDATA) source files, or adding it to a source file).
24+
# Alternatively, if you discover you've got the wrong timezone, you can just
2525
# zic -l rightzone
2626
# to correct things.
2727
# Use the command
@@ -31,14 +31,14 @@ DATAFORM= main
3131
LOCALTIME= GMT
3232

3333
# If you want something other than Eastern United States time as a template
34-
# for handling POSIX-style time zone environment variables,
35-
# change the line below (after finding the zone you want in the
36-
# time zone files, or adding it to a time zone file).
34+
# for handling POSIX-style timezone environment variables,
35+
# change the line below (after finding the timezone you want in the
36+
# one of the $(TDATA) source files, or adding it to a source file).
3737
# When a POSIX-style environment variable is handled, the rules in the
3838
# template file are used to determine "spring forward" and "fall back" days and
3939
# times; the environment variable itself specifies UT offsets of standard and
4040
# daylight saving time.
41-
# Alternatively, if you discover you've got the wrong time zone, you can just
41+
# Alternatively, if you discover you've got the wrong timezone, you can just
4242
# zic -p rightzone
4343
# to correct things.
4444
# Use the command
@@ -75,7 +75,7 @@ DESTDIR =
7575
# TOPDIR should be empty or an absolute name unless you're just testing.
7676
TOPDIR =
7777

78-
# The default local time zone is taken from the file TZDEFAULT.
78+
# The default local timezone is taken from the file TZDEFAULT.
7979
TZDEFAULT = $(TOPDIR)/etc/localtime
8080

8181
# The subdirectory containing installed program and data files, and
@@ -84,7 +84,7 @@ TZDEFAULT = $(TOPDIR)/etc/localtime
8484
USRDIR = usr
8585
USRSHAREDIR = $(USRDIR)/share
8686

87-
# "Compiled" time zone information is placed in the "TZDIR" directory
87+
# "Compiled" timezone information is placed in the "TZDIR" directory
8888
# (and subdirectories).
8989
# TZDIR_BASENAME should not contain "/" and should not be ".", ".." or empty.
9090
TZDIR_BASENAME= zoneinfo
@@ -298,7 +298,7 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \
298298
# "tzsetwall", "offtime", "timelocal", "timegm", "timeoff",
299299
# "posix2time", and "time2posix" to be added to the time conversion library.
300300
# "tzsetwall" is like "tzset" except that it arranges for local wall clock
301-
# time (rather than the time specified in the TZ environment variable)
301+
# time (rather than the timezone specified in the TZ environment variable)
302302
# to be used.
303303
# "offtime" is like "gmtime" except that it accepts a second (long) argument
304304
# that gives an offset to add to the time_t when converting it.
@@ -321,7 +321,7 @@ GCC_DEBUG_FLAGS = -DGCC_LINT -g3 -O3 -fno-common \
321321
# "posix2time_z" and "time2posix_z" are added as well.
322322
# The functions ending in "_z" (or "_rz") are like their unsuffixed
323323
# (or suffixed-by-"_r") counterparts, except with an extra first
324-
# argument of opaque type timezone_t that specifies the time zone.
324+
# argument of opaque type timezone_t that specifies the timezone.
325325
# "tzalloc" allocates a timezone_t value, and "tzfree" frees it.
326326
#
327327
# If you want to allocate state structures in localtime, add

NEWS

+13-9
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,10 @@ Unreleased, experimental changes
6464
tzfile.5 now documents what time types apply before the first and
6565
after the last transition, if any.
6666

67+
Documentation now uses the spelling "timezone" for a TZ setting
68+
that determines timestamp history, and "time zone" for a
69+
geographic region currently sharing the same standard time.
70+
6771
The name "TZif" is now used for the tz binary data format.
6872

6973
tz-link.htm now mentions the A0 TimeZone Migration utilities.
@@ -607,7 +611,7 @@ Release 2017b - 2017-03-17 07:30:38 -0700
607611
The reference localtime implementation now falls back on the
608612
current US daylight-saving transition rules rather than the
609613
1987-2006 rules. This fallback occurs only when (1) the TZ
610-
environment variable's value has a name like "AST4ADT" that asks
614+
environment variable has a value like "AST4ADT" that asks
611615
for daylight saving time but does not specify the rules, (2) there
612616
is no file by that name, and (3) the TZDEFRULES file cannot be
613617
loaded. (Thanks to Tom Lane.)
@@ -1762,7 +1766,7 @@ Release 2014g - 2014-08-28 12:31:23 -0700
17621766

17631767
Unless NETBSD_INSPIRED is defined to 0, the tz library now
17641768
supplies functions for creating and using objects that represent
1765-
time zones. The new functions are tzalloc, tzfree, localtime_rz,
1769+
timezones. The new functions are tzalloc, tzfree, localtime_rz,
17661770
mktime_z, and (if STD_INSPIRED is also defined) posix2time_z and
17671771
time2posix_z. They are intended for performance: for example,
17681772
localtime_rz (unlike localtime_r) is trivially thread-safe without
@@ -1776,7 +1780,7 @@ Release 2014g - 2014-08-28 12:31:23 -0700
17761780
TZDOBJS=zdump.o CHECK_TIME_T_ALTERNATIVES='.
17771781

17781782
zdump now uses localtime_rz if available, as it's significantly faster,
1779-
and it can help zdump better diagnose invalid time zone names.
1783+
and it can help zdump better diagnose invalid timezone names.
17801784
Define HAVE_LOCALTIME_RZ to 0 to suppress this. HAVE_LOCALTIME_RZ
17811785
defaults to 1 if NETBSD_INSPIRED && USE_LTZ. When localtime_rz is
17821786
not available, zdump now uses localtime_r and tzset if available,
@@ -1792,7 +1796,7 @@ Release 2014g - 2014-08-28 12:31:23 -0700
17921796
invalid or outlandish input.
17931797

17941798
The tz library no longer mishandles leap seconds on platforms with
1795-
unsigned time_t in time zones that lack ordinary transitions after 1970.
1799+
unsigned time_t in timezones that lack ordinary transitions after 1970.
17961800

17971801
The tz code now attempts to infer TM_GMTOFF and TM_ZONE if not
17981802
already defined, to make it easier to configure on common platforms.
@@ -3570,7 +3574,7 @@ Release 2005j - 2005-06-13 14:34:13 -0400
35703574
These reflect changes to limit the length of time zone abbreviations
35713575
and the characters used in those abbreviations.
35723576

3573-
There are also changes to handle POSIX-style "quoted" time zone
3577+
There are also changes to handle POSIX-style "quoted" timezone
35743578
environment variables.
35753579

35763580
The changes were circulated on the time zone mailing list; the only
@@ -3896,7 +3900,7 @@ Release 1999f - 1999-09-23 09:48:14 -0400
38963900
Release 1999e - 1999-08-17 15:20:54 -0400
38973901

38983902
changes circulated by Paul Eggert, although the change to handling
3899-
of DST-specifying time zone names has been commented out for now
3903+
of DST-specifying timezone names has been commented out for now
39003904
(search for "XXX" in "localtime.c" for details). These files also
39013905
do not make any changes to the start of DST in Brazil.
39023906

@@ -4021,7 +4025,7 @@ Release code1997i-data1997k - 1997-12-29 09:53:41 -0500
40214025

40224026
Release code1997h-data1997j - 1997-12-18 17:47:35 -0500
40234027

4024-
minor changes to put "TZif" at the start of each time zone information file
4028+
minor changes to put "TZif" at the start of each timezone information file
40254029

40264030
a rule has also been added to the Makefile so you can
40274031
make zones
@@ -4531,8 +4535,8 @@ consisting of a single tarball tzdb-R.tar.lz with extra data.
45314535
Release timestamps are taken from the release's commit (for newer,
45324536
Git-based releases), from the newest file in the tarball (for older
45334537
releases, where this info is available) or from the email announcing
4534-
the release (if all else fails; these are marked with a time zone of
4535-
-0000 and an "is missing!" comment).
4538+
the release (if all else fails; these are marked with a time zone
4539+
abbreviation of -0000 and an "is missing!" comment).
45364540

45374541
Earlier versions of the code and data were not announced on the tz
45384542
list and are not summarized here.

backward

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This file is in the public domain, so clarified as of
22
# 2009-05-17 by Arthur David Olson.
33

4-
# This file provides links between current names for time zones
4+
# This file provides links between current names for timezones
55
# and their old names. Many names changed in late 1993.
66

77
# Link TARGET LINK-NAME

date.1

+2-2
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,11 @@ should be an integer, either decimal, octal (leading 0), or
146146
hexadecimal (leading 0x), preceded by an optional sign.
147147
.SH FILES
148148
.ta \w'/usr/share/zoneinfo/posixrules\0\0'u
149-
/etc/localtime local time zone file
149+
/etc/localtime local timezone file
150150
.br
151151
/usr/lib/locale/\f2L\fP/LC_TIME description of time locale \f2L\fP
152152
.br
153-
/usr/share/zoneinfo time zone information directory
153+
/usr/share/zoneinfo timezone information directory
154154
.br
155155
/usr/share/zoneinfo/posixrules used with POSIX-style TZ's
156156
.br

etcetera

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
# These entries are mostly present for historical reasons, so that
55
# people in areas not otherwise covered by the tz files could "zic -l"
6-
# to a time zone that was right for their area. These days, the
6+
# to a timezone that was right for their area. These days, the
77
# tz files cover almost all the inhabited world, and the only practical
88
# need now for the entries that are not on UTC are for ships at sea
99
# that cannot use POSIX TZ settings.

factory

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# This file is in the public domain, so clarified as of
22
# 2009-05-17 by Arthur David Olson.
33

4-
# For distributors who don't want to put time zone specification in
5-
# their installation procedures. Users that run 'date' will get the
4+
# For distributors who don't want to specify a timezone in their
5+
# installation procedures. Users who run 'date' will get the
66
# time zone abbreviation "-00", indicating that the actual time zone
77
# is unknown.
88

localtime.c

+13-12
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ settzname(void)
300300
return;
301301
}
302302
/*
303-
** And to get the latest zone names into tzname. . .
303+
** And to get the latest time zone abbreviations into tzname. . .
304304
*/
305305
for (i = 0; i < sp->typecnt; ++i) {
306306
register const struct ttinfo * const ttisp = &sp->ttis[i];
@@ -774,9 +774,9 @@ static const int year_lengths[2] = {
774774
};
775775

776776
/*
777-
** Given a pointer into a time zone string, scan until a character that is not
778-
** a valid character in a zone name is found. Return a pointer to that
779-
** character.
777+
** Given a pointer into a timezone string, scan until a character that is not
778+
** a valid character in a time zone abbreviation is found.
779+
** Return a pointer to that character.
780780
*/
781781

782782
static const char *
@@ -791,8 +791,9 @@ getzname(register const char *strp)
791791
}
792792

793793
/*
794-
** Given a pointer into an extended time zone string, scan until the ending
795-
** delimiter of the zone name is located. Return a pointer to the delimiter.
794+
** Given a pointer into an extended timezone string, scan until the ending
795+
** delimiter of the time zone abbreviation is located.
796+
** Return a pointer to the delimiter.
796797
**
797798
** As with getzname above, the legal character set is actually quite
798799
** restricted, with other characters producing undefined results.
@@ -810,7 +811,7 @@ getqzname(register const char *strp, const int delim)
810811
}
811812

812813
/*
813-
** Given a pointer into a time zone string, extract a number from that string.
814+
** Given a pointer into a timezone string, extract a number from that string.
814815
** Check that the number is within a specified range; if it is not, return
815816
** NULL.
816817
** Otherwise, return a pointer to the first character not part of the number.
@@ -838,7 +839,7 @@ getnum(register const char *strp, int *const nump, const int min, const int max)
838839
}
839840

840841
/*
841-
** Given a pointer into a time zone string, extract a number of seconds,
842+
** Given a pointer into a timezone string, extract a number of seconds,
842843
** in hh[:mm[:ss]] form, from the string.
843844
** If any error occurs, return NULL.
844845
** Otherwise, return a pointer to the first character not part of the number
@@ -879,7 +880,7 @@ getsecs(register const char *strp, int_fast32_t *const secsp)
879880
}
880881

881882
/*
882-
** Given a pointer into a time zone string, extract an offset, in
883+
** Given a pointer into a timezone string, extract an offset, in
883884
** [+-]hh[:mm[:ss]] form, from the string.
884885
** If any error occurs, return NULL.
885886
** Otherwise, return a pointer to the first character not part of the time.
@@ -904,7 +905,7 @@ getoffset(register const char *strp, int_fast32_t *const offsetp)
904905
}
905906

906907
/*
907-
** Given a pointer into a time zone string, extract a rule in the form
908+
** Given a pointer into a timezone string, extract a rule in the form
908909
** date[/time]. See POSIX section 8 for the format of "date" and "time".
909910
** If a valid rule is not found, return NULL.
910911
** Otherwise, return a pointer to the first character not part of the rule.
@@ -1106,7 +1107,7 @@ tzparse(const char *name, struct state *sp, bool lastditch)
11061107
} else {
11071108
dstname = name;
11081109
name = getzname(name);
1109-
dstlen = name - dstname; /* length of DST zone name */
1110+
dstlen = name - dstname; /* length of DST abbr. */
11101111
}
11111112
if (!dstlen)
11121113
return false;
@@ -1450,7 +1451,7 @@ tzfree(timezone_t sp)
14501451
**
14511452
** If successful and SETNAME is nonzero,
14521453
** set the applicable parts of tzname, timezone and altzone;
1453-
** however, it's OK to omit this step if the time zone is POSIX-compatible,
1454+
** however, it's OK to omit this step if the timezone is POSIX-compatible,
14541455
** since in that case tzset should have already done this step correctly.
14551456
** SETNAME's type is intfast32_t for compatibility with gmtsub,
14561457
** but it is actually a boolean and its value should be 0 or 1.

newctime.3

+4-4
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ and
187187
are like their unsuffixed counterparts, except that they accept an
188188
extra initial
189189
.B zone
190-
argument specifying the time zone to be used for conversion.
190+
argument specifying the timezone to be used for conversion.
191191
If
192192
.B zone
193193
is null, UT is used; otherwise,
@@ -252,9 +252,9 @@ There is no guarantee that these fields and this variable will
252252
continue to exist in this form in future releases of this code.
253253
.SH FILES
254254
.ta \w'/usr/share/zoneinfo/posixrules\0\0'u
255-
/usr/share/zoneinfo time zone information directory
255+
/usr/share/zoneinfo timezone information directory
256256
.br
257-
/usr/share/zoneinfo/localtime local time zone file
257+
/usr/share/zoneinfo/localtime local timezone file
258258
.br
259259
/usr/share/zoneinfo/posixrules used with POSIX-style TZ's
260260
.br
@@ -292,7 +292,7 @@ can be freed or overwritten by later calls to the functions
292292
.IR tzfree ,
293293
and
294294
.IR tzset ,
295-
if these functions affect the time zone information that specifies the
295+
if these functions affect the timezone information that specifies the
296296
abbreviation in question.
297297
The remaining functions and data are thread-safe.
298298
.PP

newstrftime.3

+3-2
Original file line numberDiff line numberDiff line change
@@ -210,15 +210,16 @@ is replaced by the year with century as a decimal number.
210210
is replaced by the year without century as a decimal number (00\*(en99).
211211
.TP
212212
%Z
213-
is replaced by the time zone name,
213+
is replaced by the time zone abbreviation,
214214
or by the empty string if this is not determinable.
215215
.TP
216216
%z
217217
is replaced by the offset from the Prime Meridian
218218
in the format +HHMM or \*-HHMM as appropriate,
219219
with positive values representing locations east of Greenwich,
220220
or by the empty string if this is not determinable.
221-
The numeric time zone \*-0000 is used when the time is Universal Time
221+
The numeric time zone abbreviation \*-0000 is used when the time is
222+
Universal Time
222223
but local time is indeterminate; by convention this is used for
223224
locations while uninhabited, and corresponds to a zero offset when the
224225
time zone abbreviation begins with

newtzset.3

+8-8
Original file line numberDiff line numberDiff line change
@@ -26,17 +26,17 @@ tzset \- initialize time conversion information
2626
\\$3\*(lq\\$1\*(rq\\$2
2727
..
2828
.I Tzalloc
29-
allocates and returns a time zone object described by
29+
allocates and returns a timezone object described by
3030
.BR TZ .
3131
If
3232
.B TZ
33-
is not a valid time zone description, or if the object cannot be allocated,
33+
is not a valid timezone description, or if the object cannot be allocated,
3434
.I tzalloc
3535
returns a null pointer and sets
3636
.BR errno .
3737
.PP
3838
.I Tzfree
39-
frees a time zone object
39+
frees a timezone object
4040
.BR tz ,
4141
which should have been successfully allocated by
4242
.IR tzalloc .
@@ -49,13 +49,13 @@ was used to set.
4949
.I Tzset
5050
acts like
5151
.BR tzalloc(getenv("TZ")) ,
52-
except it saves any resulting time zone object into internal
52+
except it saves any resulting timezone object into internal
5353
storage that is accessed by
5454
.IR localtime ,
5555
.IR localtime_r ,
5656
and
5757
.IR mktime .
58-
The anonymous shared time zone object is freed by the next call to
58+
The anonymous shared timezone object is freed by the next call to
5959
.IR tzset .
6060
If the implied call to
6161
.B tzalloc
@@ -252,7 +252,7 @@ is not given, is
252252
.LP
253253
Here are some examples of
254254
.B TZ
255-
values that directly specify the time zone rules; they use some of the
255+
values that directly specify the timezone; they use some of the
256256
extensions to POSIX.
257257
.TP
258258
.B EST5
@@ -321,9 +321,9 @@ may be used to separate the
321321
from the rest of the specification.
322322
.SH FILES
323323
.ta \w'/usr/share/zoneinfo/posixrules\0\0'u
324-
/usr/share/zoneinfo time zone information directory
324+
/usr/share/zoneinfo timezone information directory
325325
.br
326-
/usr/share/zoneinfo/localtime local time zone file
326+
/usr/share/zoneinfo/localtime local timezone file
327327
.br
328328
/usr/share/zoneinfo/posixrules used with POSIX-style TZ's
329329
.br

0 commit comments

Comments
 (0)