* NEWS: Mention this.
* resolv/ns_date.c, sysdeps/generic/netinet/in_systm.h:
* sysdeps/nptl/pthread.h, time/bits/types/struct_timeb.h:
* time/strftime_l.c, time/sys/time.h, time/tzfile.c, time/tzset.c:
In strings and commentary, prefer "UTC" to "GMT" when referring to
Coordinated Universal Time. POSIX.1-2024 requires this and other
systems do it this way.
---
NEWS | 5 +++++
resolv/ns_date.c | 2 +-
sysdeps/generic/netinet/in_systm.h | 2 +-
sysdeps/nptl/pthread.h | 2 +-
time/bits/types/struct_timeb.h | 2 +-
time/strftime_l.c | 2 +-
time/sys/time.h | 2 +-
time/tzset.c | 10 +++++-----
8 files changed, 16 insertions(+), 11 deletions(-)
@@ -84,6 +84,11 @@ Deprecated and removed features, and other changes affecting compatibility:
explicitly because of the executable bit in GNU_STACK, and the stack is
not already executable. Instead, loading such objects will fail.
+* gmtime and similar functions now use "UTC", not "GMT", to abbreviate
+ Coordinated Universal Time (often called "GMT", though they are not
+ quite the same). This is more compatible with other platforms and is
+ required by POSIX.1-2024.
+
* The US daylight saving rule is now the default for incomplete TZ
strings like TZ="AST4ADT" that use the TZ syntax from circa-1980s
Unix System V. Formerly the rule was documented to be that of
@@ -35,7 +35,7 @@ static int datepart(const char *, int, int, int, int *);
/*%
* Convert a date in ASCII into the number of seconds since
- * 1 January 1970 (GMT assumed). Format is yyyymmddhhmmss, all
+ * 1 January 1970 (UTC assumed). Format is yyyymmddhhmmss, all
* digits required, no spaces allowed.
*/
@@ -33,7 +33,7 @@ __BEGIN_DECLS
typedef uint16_t n_short; /* short as received from the net */
typedef uint32_t n_long; /* long as received from the net */
-typedef uint32_t n_time; /* ms since 00:00 GMT, byte rev */
+typedef uint32_t n_time; /* ms since 00:00 UTC, byte rev */
__END_DECLS
@@ -1137,7 +1137,7 @@ extern int pthread_cond_wait (pthread_cond_t *__restrict __cond,
/* Wait for condition variable COND to be signaled or broadcast until
ABSTIME. MUTEX is assumed to be locked before. ABSTIME is an
absolute time specification; zero is the beginning of the epoch
- (00:00:00 GMT, January 1, 1970).
+ (00:00:00 UTC, January 1, 1970).
This function is a cancellation point and therefore not marked with
__THROW. */
@@ -8,7 +8,7 @@ struct timeb
{
time_t time; /* Seconds since epoch, as from 'time'. */
unsigned short int millitm; /* Additional milliseconds. */
- short int timezone; /* Minutes west of GMT. */
+ short int timezone; /* Minutes west of UTC. */
short int dstflag; /* Nonzero if Daylight Savings Time used. */
};
@@ -543,7 +543,7 @@ __strftime_internal (CHAR_T *s, size_t maxsize, const CHAR_T *format,
if (ut)
{
if (! (zone && *zone))
- zone = "GMT";
+ zone = "UTC";
}
#endif
@@ -51,7 +51,7 @@ __BEGIN_DECLS
This is obsolete and should never be used. */
struct timezone
{
- int tz_minuteswest; /* Minutes west of GMT. */
+ int tz_minuteswest; /* Minutes west of UTC. */
int tz_dsttime; /* Nonzero if DST is ever in effect. */
};
#endif
@@ -29,7 +29,7 @@
#define SECSPERDAY ((__time64_t) 86400)
-char *__tzname[2] = { (char *) "GMT", (char *) "GMT" };
+char *__tzname[2] = { (char *) "UTC", (char *) "UTC" };
int __daylight = 0;
long int __timezone = 0L;
@@ -51,7 +51,7 @@ typedef struct
unsigned short int m, n, d; /* Month, week, day. */
int secs; /* Time of day. */
- int offset; /* Seconds east of GMT (west if < 0). */
+ int offset; /* Seconds east of UTC (west if < 0). */
/* We cache the computed time of change for a
given year so we don't have to recompute it. */
@@ -449,7 +449,7 @@ compute_change (tz_rule *rule, long long int year)
if (rule->computed_for == year)
return;
- /* First set T to January 1st, 0:00:00 GMT in YEAR. */
+ /* First set T to YEAR-01-01 00:00:00 UT. */
t = (((year - 1970) * 365
/* Compute the number of leap days between 1970 and YEAR (exclusive).
There is a leap day every 4th year ... */
@@ -521,7 +521,7 @@ compute_change (tz_rule *rule, long long int year)
break;
}
- /* T is now the Epoch-relative time of 0:00:00 GMT on the day we want.
+ /* T is now the Epoch-relative time of 00:00:00 UT on the day we want.
Just subtract the UT offset and add the time of day, and we're done. */
rule->change = t - rule->offset + rule->secs;
@@ -611,7 +611,7 @@ __tz_convert (__time64_t timer, int use_localtime, struct tm *tp)
if (! use_localtime)
{
tp->tm_isdst = 0;
- tp->tm_zone = "GMT";
+ tp->tm_zone = "UTC";
tp->tm_gmtoff = 0L;
}