mirror of
https://frontier.innolan.net/rainlance/amiga-tz.git
synced 2026-10-02 23:28:35 +00:00
Correct some UTC-vs-UT solecisms.
In several places the code and documentation incorrectly used "UTC" to describe time stamps that might precede the introduction of UTC and for which UTC is therefore undefined. Change these uses to "UT", as that's the correct term when talking about these time stamps. Problem reported by Steve Allen in <http://mm.icann.org/pipermail/tz/2013-September/019907.html>. The major compatibility issue here is with 'zdump -v'; it'll now output "UT" instead of the possibly-incorrect "UTC". Many files change in minor ways in the commentary. * zdump.c (show): * zic.c (inzsub, addtype): In output, say "UT" rather than "UTC", since the time stamp we're talking about might precede the introduction of UTC.
This commit is contained in:
@@ -28,7 +28,7 @@ LOCALTIME= GMT
|
||||
# time zone files, or adding it to a time zone file).
|
||||
# (When a POSIX-style environment variable is handled, the rules in the
|
||||
# template file are used to determine "spring forward" and "fall back" days and
|
||||
# times; the environment variable itself specifies UTC offsets of standard and
|
||||
# times; the environment variable itself specifies UT offsets of standard and
|
||||
# summer time.)
|
||||
# Alternately, if you discover you've got the wrong time zone, you can just
|
||||
# zic -p rightzone
|
||||
@@ -196,7 +196,7 @@ GCC_DEBUG_FLAGS = -Dlint -g3 -O3 -fno-common -fstrict-aliasing \
|
||||
# that gives an offset to add to the time_t when converting it.
|
||||
# "timelocal" is equivalent to "mktime".
|
||||
# "timegm" is like "timelocal" except that it turns a struct tm into
|
||||
# a time_t using UTC (rather than local time as "timelocal" does).
|
||||
# a time_t using UT (rather than local time as "timelocal" does).
|
||||
# "timeoff" is like "timegm" except that it accepts a second (long) argument
|
||||
# that gives an offset to use when converting to a time_t.
|
||||
# "posix2time" and "time2posix" are described in an included manual page.
|
||||
|
||||
@@ -43,7 +43,7 @@ POSIX has the following properties and limitations.
|
||||
"+" and "-" in the names.
|
||||
offset
|
||||
is of the form '[+-]hh:[mm[:ss]]' and specifies the
|
||||
offset west of UTC. 'hh' may be a single digit; 0<=hh<=24.
|
||||
offset west of UT. 'hh' may be a single digit; 0<=hh<=24.
|
||||
The default DST offset is one hour ahead of standard time.
|
||||
date[/time],date[/time]
|
||||
specifies the beginning and end of DST. If this is absent,
|
||||
@@ -189,7 +189,7 @@ Points of interest to folks with other systems:
|
||||
but this functionality was removed in later versions of BSD.
|
||||
|
||||
* In SVR2, time conversion fails for near-minimum or near-maximum
|
||||
time_t values when doing conversions for places that don't use UTC.
|
||||
time_t values when doing conversions for places that don't use UT.
|
||||
This package takes care to do these conversions correctly.
|
||||
|
||||
The functions that are conditionally compiled if STD_INSPIRED is defined
|
||||
@@ -428,14 +428,14 @@ in decreasing order of importance:
|
||||
Use 'LMT' for local mean time of locations before the introduction
|
||||
of standard time; see "Scope of the tz database".
|
||||
|
||||
Use UTC (with time zone abbreviation 'zzz') for locations while
|
||||
Use UT (with time zone abbreviation 'zzz') for locations while
|
||||
uninhabited. The 'zzz' mnemonic is that these locations are,
|
||||
in some sense, asleep.
|
||||
|
||||
Application writers should note that these abbreviations are ambiguous
|
||||
in practice: e.g. 'EST' has a different meaning in Australia than
|
||||
it does in the United States. In new applications, it's often better
|
||||
to use numeric UTC offsets like '-0500' instead of time zone
|
||||
to use numeric UT offsets like '-0500' instead of time zone
|
||||
abbreviations like 'EST'; this avoids the ambiguity.
|
||||
|
||||
|
||||
|
||||
+1
-1
@@ -736,7 +736,7 @@ Zone Pacific/Funafuti 11:56:52 - LMT 1901
|
||||
# 1886-1891; Baker was similar but exact dates are not known.
|
||||
# Inhabited by civilians 1935-1942; U.S. military bases 1943-1944;
|
||||
# uninhabited thereafter.
|
||||
# Howland observed Hawaii Standard Time (UTC-10:30) in 1937;
|
||||
# Howland observed Hawaii Standard Time (UT-10:30) in 1937;
|
||||
# see page 206 of Elgen M. Long and Marie K. Long,
|
||||
# Amelia Earhart: the Mystery Solved, Simon & Schuster (2000).
|
||||
# So most likely Howland and Baker observed Hawaii Time from 1935
|
||||
|
||||
@@ -134,7 +134,7 @@ the seconds part of the new time; if no seconds are given, zero is assumed.
|
||||
These options are available:
|
||||
.TP
|
||||
.BR \-u " or " \-c
|
||||
Use UTC when setting and showing the date and time.
|
||||
Use Universal Time when setting and showing the date and time.
|
||||
.TP
|
||||
.BI "\-r " seconds
|
||||
Output the date that corresponds to
|
||||
|
||||
@@ -118,7 +118,7 @@ main(const int argc, char *argv[])
|
||||
switch (ch) {
|
||||
default:
|
||||
usage();
|
||||
case 'u': /* do it in UTC */
|
||||
case 'u': /* do it in UT */
|
||||
case 'c':
|
||||
dogmt();
|
||||
break;
|
||||
|
||||
@@ -31,9 +31,9 @@ Link Etc/GMT Etc/GMT0
|
||||
# even though this is the opposite of what many people expect.
|
||||
# POSIX has positive signs west of Greenwich, but many people expect
|
||||
# positive signs east of Greenwich. For example, TZ='Etc/GMT+4' uses
|
||||
# the abbreviation "GMT+4" and corresponds to 4 hours behind UTC
|
||||
# the abbreviation "GMT+4" and corresponds to 4 hours behind UT
|
||||
# (i.e. west of Greenwich) even though many people would expect it to
|
||||
# mean 4 hours ahead of UTC (i.e. east of Greenwich).
|
||||
# mean 4 hours ahead of UT (i.e. east of Greenwich).
|
||||
#
|
||||
# In the draft 5 of POSIX 1003.1-200x, the angle bracket notation allows for
|
||||
# TZ='<GMT-4>+4'; if you want time zone abbreviations conforming to
|
||||
|
||||
@@ -1863,7 +1863,7 @@ Zone Europe/Oslo 0:43:00 - LMT 1895 Jan 1
|
||||
# before 1895, and therefore probably changed the local time somewhere
|
||||
# between 1895 and 1925 (inclusive).
|
||||
|
||||
# From Paul Eggert (2013-09-02):
|
||||
# From Paul Eggert (2013-09-04):
|
||||
#
|
||||
# Actually, Jan Mayen was never occupied by Germany during World War II,
|
||||
# so it must have diverged from Oslo time during the war, as Oslo was
|
||||
@@ -1874,7 +1874,7 @@ Zone Europe/Oslo 0:43:00 - LMT 1895 Jan 1
|
||||
# 1941 with a small Norwegian garrison and continued operations despite
|
||||
# frequent air ttacks from Germans. In 1943 the Americans established a
|
||||
# radiolocating station on the island, called "Atlantic City". Possibly
|
||||
# the UTC offset changed during the war, but I think it unlikely that
|
||||
# the UT offset changed during the war, but I think it unlikely that
|
||||
# Jan Mayen used German daylight-saving rules.
|
||||
#
|
||||
# Svalbard is more complicated, as it was raided in August 1941 by an
|
||||
|
||||
+6
-6
@@ -77,11 +77,11 @@ static const char gmt[] = "GMT";
|
||||
#endif /* !defined TZDEFDST */
|
||||
|
||||
struct ttinfo { /* time type information */
|
||||
int_fast32_t tt_gmtoff; /* UTC offset in seconds */
|
||||
int_fast32_t tt_gmtoff; /* UT offset in seconds */
|
||||
int tt_isdst; /* used to set tm_isdst */
|
||||
int tt_abbrind; /* abbreviation list index */
|
||||
int tt_ttisstd; /* TRUE if transition is std time */
|
||||
int tt_ttisgmt; /* TRUE if transition is UTC */
|
||||
int tt_ttisgmt; /* TRUE if transition is UT */
|
||||
};
|
||||
|
||||
struct lsinfo { /* leap second information */
|
||||
@@ -842,7 +842,7 @@ getrule(const char *strp, register struct rule *const rulep)
|
||||
|
||||
/*
|
||||
** Given the Epoch-relative time of January 1, 00:00:00 UTC, in a year, the
|
||||
** year, a rule, and the offset from UTC at the time that rule takes effect,
|
||||
** year, a rule, and the offset from UT at the time that rule takes effect,
|
||||
** calculate the Epoch-relative time that rule takes effect.
|
||||
*/
|
||||
|
||||
@@ -925,10 +925,10 @@ transtime(const time_t janfirst, const int year,
|
||||
}
|
||||
|
||||
/*
|
||||
** "value" is the Epoch-relative time of 00:00:00 UTC on the day in
|
||||
** "value" is the Epoch-relative time of 00:00:00 UT on the day in
|
||||
** question. To get the Epoch-relative time of the specified local
|
||||
** time on that day, add the transition time and the current offset
|
||||
** from UTC.
|
||||
** from UT.
|
||||
*/
|
||||
return value + rulep->r_time + offset;
|
||||
}
|
||||
@@ -1379,7 +1379,7 @@ gmtsub(const time_t *const timep, const int_fast32_t offset,
|
||||
#ifdef TM_ZONE
|
||||
/*
|
||||
** Could get fancy here and deliver something such as
|
||||
** "UTC+xxxx" or "UTC-xxxx" if offset is non-zero,
|
||||
** "UT+xxxx" or "UT-xxxx" if offset is non-zero,
|
||||
** but this is no time for a treasure hunt.
|
||||
*/
|
||||
if (offset != 0)
|
||||
|
||||
+2
-2
@@ -165,7 +165,7 @@ includes the following fields:
|
||||
int tm_yday; /\(** day of year (0 - 365) \(**/
|
||||
int tm_isdst; /\(** is summer time in effect? \(**/
|
||||
char \(**tm_zone; /\(** abbreviation of timezone name \(**/
|
||||
long tm_gmtoff; /\(** offset from UTC in seconds \(**/
|
||||
long tm_gmtoff; /\(** offset from UT in seconds \(**/
|
||||
.fi
|
||||
.RE
|
||||
.PP
|
||||
@@ -184,7 +184,7 @@ is non-zero if summer time is in effect.
|
||||
.PP
|
||||
.I Tm_gmtoff
|
||||
is the offset (in seconds) of the time represented
|
||||
from UTC, with positive values indicating east
|
||||
from UT, with positive values indicating east
|
||||
of the Prime Meridian.
|
||||
.SH FILES
|
||||
.ta \w'/usr/local/etc/zoneinfo/posixrules\0\0'u
|
||||
|
||||
+2
-2
@@ -164,7 +164,7 @@ using AM/PM notation.
|
||||
is replaced by the second as a decimal number (00-60).
|
||||
.TP
|
||||
%s
|
||||
is replaced by the number of seconds since the Epoch, UTC (see mktime(3)).
|
||||
is replaced by the number of seconds since the Epoch, UT (see mktime(3)).
|
||||
.TP
|
||||
%T
|
||||
is replaced by the time in the format %H:%M:%S.
|
||||
@@ -211,7 +211,7 @@ is replaced by the time zone name,
|
||||
or by the empty string if this is not determinable.
|
||||
.TP
|
||||
%z
|
||||
is replaced by the offset from UTC in the format +HHMM or -HHMM as appropriate,
|
||||
is replaced by the offset from UT in the format +HHMM or -HHMM as appropriate,
|
||||
with positive values representing locations east of Greenwich,
|
||||
or by the empty string if this is not determinable.
|
||||
.TP
|
||||
|
||||
+3
-2
@@ -26,8 +26,9 @@ in the system time conversion information directory, is used by
|
||||
If
|
||||
.B TZ
|
||||
appears in the environment but its value is a null string,
|
||||
Coordinated Universal Time (UTC) is used (without leap second
|
||||
correction). If
|
||||
Universal Time (UT) is used, with the abbreviation "UTC"
|
||||
and without leap second
|
||||
correction. If
|
||||
.B TZ
|
||||
appears in the environment and its value is not a null string:
|
||||
.IP
|
||||
|
||||
+1
-1
@@ -501,7 +501,7 @@ label:
|
||||
diff = t->TM_GMTOFF;
|
||||
#else /* !defined TM_GMTOFF */
|
||||
/*
|
||||
** C99 says that the UTC offset must
|
||||
** C99 says that the UT offset must
|
||||
** be computed by looking only at
|
||||
** tm_isdst. This requirement is
|
||||
** incorrect, since it means the code
|
||||
|
||||
@@ -20,7 +20,7 @@ These values are,
|
||||
in order:
|
||||
.TP
|
||||
.I tzh_ttisgmtcnt
|
||||
The number of UTC/local indicators stored in the file.
|
||||
The number of UT/local indicators stored in the file.
|
||||
.TP
|
||||
.I tzh_ttisstdcnt
|
||||
The number of standard/wall indicators stored in the file.
|
||||
@@ -83,7 +83,7 @@ and a one-byte value for
|
||||
.IR tt_abbrind .
|
||||
In each structure,
|
||||
.I tt_gmtoff
|
||||
gives the number of seconds to be added to UTC,
|
||||
gives the number of seconds to be added to UT,
|
||||
.I tt_isdst
|
||||
tells whether
|
||||
.I tm_isdst
|
||||
@@ -118,9 +118,9 @@ time zone environment variables.
|
||||
.PP
|
||||
Finally there are
|
||||
.I tzh_ttisgmtcnt
|
||||
UTC/local indicators, each stored as a one-byte value;
|
||||
UT/local indicators, each stored as a one-byte value;
|
||||
they tell whether the transition times associated with local time types
|
||||
were specified as UTC or local time,
|
||||
were specified as UT or local time,
|
||||
and are used when a time zone file is used in handling POSIX-style
|
||||
time zone environment variables.
|
||||
.PP
|
||||
|
||||
@@ -55,7 +55,7 @@ struct tzhead {
|
||||
** tzh_timecnt (char [4])s coded transition times a la time(2)
|
||||
** tzh_timecnt (unsigned char)s types of local time starting at above
|
||||
** tzh_typecnt repetitions of
|
||||
** one (char [4]) coded UTC offset in seconds
|
||||
** one (char [4]) coded UT offset in seconds
|
||||
** one (unsigned char) used to set tm_isdst
|
||||
** one (unsigned char) that's an abbreviation list index
|
||||
** tzh_charcnt (char)s '\0'-terminated zone abbreviations
|
||||
@@ -68,7 +68,7 @@ struct tzhead {
|
||||
** if absent, transition times are
|
||||
** assumed to be wall clock time
|
||||
** tzh_ttisgmtcnt (char)s indexed by type; if TRUE, transition
|
||||
** time is UTC, if FALSE,
|
||||
** time is UT, if FALSE,
|
||||
** transition time is local time
|
||||
** if absent, transition times are
|
||||
** assumed to be local time
|
||||
|
||||
@@ -628,7 +628,7 @@ show(char *zone, time_t t, int v)
|
||||
(void) printf(tformat(), t);
|
||||
} else {
|
||||
dumptime(tmp);
|
||||
(void) printf(" UTC");
|
||||
(void) printf(" UT");
|
||||
}
|
||||
(void) printf(" = ");
|
||||
}
|
||||
|
||||
@@ -288,13 +288,13 @@ This is the name used in creating the time conversion information file for the
|
||||
zone.
|
||||
.TP
|
||||
.B GMTOFF
|
||||
The amount of time to add to UTC to get standard time in this zone.
|
||||
The amount of time to add to UT to get standard time in this zone.
|
||||
This field has the same format as the
|
||||
.B AT
|
||||
and
|
||||
.B SAVE
|
||||
fields of rule lines;
|
||||
begin the field with a minus sign if time must be subtracted from UTC.
|
||||
begin the field with a minus sign if time must be subtracted from UT.
|
||||
.TP
|
||||
.B RULES/SAVE
|
||||
The name of the rule(s) that apply in the time zone or,
|
||||
@@ -315,10 +315,10 @@ a slash (/)
|
||||
separates standard and daylight abbreviations.
|
||||
.TP
|
||||
.B UNTILYEAR [MONTH [DAY [TIME]]]
|
||||
The time at which the UTC offset or the rule(s) change for a location.
|
||||
The time at which the UT offset or the rule(s) change for a location.
|
||||
It is specified as a year, a month, a day, and a time of day.
|
||||
If this is specified,
|
||||
the time zone information is generated from the given UTC offset
|
||||
the time zone information is generated from the given UT offset
|
||||
and rule change until the time specified.
|
||||
The month, day, and time of day have the same format as the IN, ON, and AT
|
||||
fields of a rule; trailing fields can be omitted, and default to the
|
||||
@@ -485,9 +485,9 @@ If,
|
||||
for a particular zone,
|
||||
a clock advance caused by the start of daylight saving
|
||||
coincides with and is equal to
|
||||
a clock retreat caused by a change in UTC offset,
|
||||
a clock retreat caused by a change in UT offset,
|
||||
.IR zic
|
||||
produces a single transition to daylight saving at the new UTC offset
|
||||
produces a single transition to daylight saving at the new UT offset
|
||||
(without any change in wall clock time).
|
||||
To get separate transitions
|
||||
use multiple zone continuation lines
|
||||
|
||||
@@ -1005,7 +1005,7 @@ inzsub(register char **const fields, const int nfields, const int iscont)
|
||||
}
|
||||
z.z_filename = filename;
|
||||
z.z_linenum = linenum;
|
||||
z.z_gmtoff = gethms(fields[i_gmtoff], _("invalid UTC offset"), TRUE);
|
||||
z.z_gmtoff = gethms(fields[i_gmtoff], _("invalid UT offset"), TRUE);
|
||||
if ((cp = strchr(fields[i_format], '%')) != 0) {
|
||||
if (*++cp != 's' || strchr(cp, '%') != 0) {
|
||||
error(_("invalid abbreviation format"));
|
||||
@@ -2079,7 +2079,7 @@ wp = ecpyalloc(_("no POSIX environment variable for zone"));
|
||||
INITIALIZE(ktime);
|
||||
if (useuntil) {
|
||||
/*
|
||||
** Turn untiltime into UTC
|
||||
** Turn untiltime into UT
|
||||
** assuming the current gmtoff and
|
||||
** stdoff values.
|
||||
*/
|
||||
@@ -2253,7 +2253,7 @@ addtype(const zic_t gmtoff, const char *const abbr, const int isdst,
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
if (! (-1L - 2147483647L <= gmtoff && gmtoff <= 2147483647L)) {
|
||||
error(_("UTC offset out of range"));
|
||||
error(_("UT offset out of range"));
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
gmtoffs[i] = gmtoff;
|
||||
|
||||
Reference in New Issue
Block a user