aboutsummaryrefslogtreecommitdiff
path: root/manual/time.texi
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1996-09-12 02:51:03 +0000
committerUlrich Drepper <drepper@redhat.com>1996-09-12 02:51:03 +0000
commitf0f1bf8536fe660cb6230a22694f9b7e6b02605e (patch)
treea26814737a9eb5d4d5f4b0144f2fe610057a5d62 /manual/time.texi
parent158ff48e348ece17fbda4d9b3c152df2f7cc76d0 (diff)
downloadglibc-f0f1bf8536fe660cb6230a22694f9b7e6b02605e.tar
glibc-f0f1bf8536fe660cb6230a22694f9b7e6b02605e.tar.gz
glibc-f0f1bf8536fe660cb6230a22694f9b7e6b02605e.tar.bz2
glibc-f0f1bf8536fe660cb6230a22694f9b7e6b02605e.zip
update from main archive 960911cvs/libc-960912
Thu Sep 12 03:35:27 1996 Ulrich Drepper <drepper@cygnus.com> * sysdeps/unix/sysv/linux/i386/Dist: Remove init-first.h. * sysdeps/unix/sysv/linux/m68k/Dist: Likewise. * sysdeps/unix/sysv/linux/Dist: Add init-first.h. 1996-09-11 Paul Eggert <eggert@twinsun.com> * strftime.c (strftime): Handle E and O modifiers, required for POSIX.2 and XPG4. Don't use sprintf to format numbers; this way, we can handle time_t correctly regardless of whether it's signed. Don't dump core if format ends in %. In default %c format, use %e instead of %d, for POSIX.2 compatibility. For %z: Use tm_gmtoff if available. Output nothing if tm_isdst is negative. Output correct value even if arg is 1969-12-31 23:59:59 UTC. Don't assume that UTC offset is less than 24 hours; Posix requires support for 24 hours, and there's no point limiting it at all. (HAVE_TM_GMTOFF, TYPE_SIGNED, INT_STRLEN_BOUND): New macros. (CHAR_BIT): Define if <limits.h> doesn't. (tm_diff): New function. (fmt, <stdio.h>): Remove; no longer used. Thu Sep 12 02:21:44 1996 Ulrich Drepper <drepper@cygnus.com> * db/Makefile: Add extra-libs-others variable so that shared library is built in `others' pass. * elf/Makefile: Likewise. * math/Makefile: Likewise. * resolv/Makefile: Likewise. * Makefile (generated): Add version.info.h. * time/checktab.awk: New file. From ADO 96k. * time/iso3166.tab: Likewise. * time/tzselect.ksh: Likewise. * time/zone.tab: Likewise. * stdio-common/vfprintf.c: Correct cleanup registration. We cannot use a macro 1996-09-11 Paul Eggert <eggert@twinsun.com> * time/time.h (tm_gmtoff, tm_zone): Prefix with `__' unless __USE_BSD; this is required for ANSI C compatibility. * manual/time.texi: Replace GMT by UTC, daylight savings by daylight saving, timezone by time zone. Rewrite description of %V to match ISO 8601. Fix TZ Posix string example for US Eastern time. Explain tzname[1] when DST isn't used. Explain tzname when multiple abbreviations used (e.g. EST/EWT/EDT). Explain that timezone's sign is opposite from tm_gmtoff, and that timezone lacks DST adjustment whereas tm_gmtoff has it. Deprecate tzname and timezone. Tue Sep 10 14:46:16 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> Implement Roland McGrath's idea of how to put an .interp into shared libraries. * interp.c: New file. * Makerules (interp-obj): New object, linked into every shared library. (common-generated): Add interp.so. (CFLAGS-interp.c): Pass name of interpreter. Tue Sep 10 21:09:35 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * db/Makefile: Fix typo. Tue Sep 10 19:29:53 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * nss/db-Makefile ($(VAR_DB)/passwd.db): Look for multiple occurences of the same uid, and only generate a mapping for the first one. Tue Sep 10 03:14:59 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/unix/sysv/linux/system.c: New file, to override sysdeps/unix/system.c. Tue Sep 10 15:05:40 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * Makefile (before-compile): Add version-info.h, needed to build version.d. Tue Sep 10 14:14:33 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * sysdeps/unix/sysv/linux/m68k/sysdep.S: Remove check for EWOULDBLOCK, never true on Linux. (__errno_location): New function. [_LIBC_REENTRANT]: Set errno using __errno_location function. * sysdeps/unix/sysv/linux/m68k/sysdep.h [PIC]: Add second syscall_error handler for reentrant libc. Tue Sep 10 13:27:49 1996 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de> * elf/Makefile (extra-objs): Add eval.so to get dependencies. Wed Sep 11 04:40:57 1996 Ulrich Drepper <drepper@cygnus.com> * time/tzset.c (__tzname_cur_max): Use type `size_t' to avoid warning. * time/tzfile.c (compute_tzname_max): Likewise.
Diffstat (limited to 'manual/time.texi')
-rw-r--r--manual/time.texi96
1 files changed, 57 insertions, 39 deletions
diff --git a/manual/time.texi b/manual/time.texi
index f439840170..9da23fbfb3 100644
--- a/manual/time.texi
+++ b/manual/time.texi
@@ -318,10 +318,10 @@ about the local time zone. It has the following members:
@table @code
@item int tz_minuteswest
-This is the number of minutes west of GMT.
+This is the number of minutes west of UTC.
@item int tz_dsttime
-If nonzero, daylight savings time applies during some part of the year.
+If nonzero, daylight saving time applies during some part of the year.
@end table
The @code{struct timezone} type is obsolete and should never be used.
@@ -504,15 +504,17 @@ information is not available.
@item long int tm_gmtoff
This field describes the time zone that was used to compute this
-broken-down time value; it is the amount you must add to the local time
-in that zone to get GMT, in units of seconds. The value is like that of
-the variable @code{timezone} (@pxref{Time Zone Functions}). You can
-also think of this as the ``number of seconds west'' of GMT. The
-@code{tm_gmtoff} field is a GNU library extension.
+broken-down time value, including any adjustment for daylight saving; it
+is the number of seconds that you must add to UTC to get local time.
+You can also think of this as the number of seconds east of UTC. For
+example, for U.S. Eastern Standard Time, the value is @code{-5*60*60}.
+The @code{tm_gmtoff} field is derived from BSD and is a GNU library
+extension; it is not visible in a strict ANSI C environment.
@item const char *tm_zone
-This field is the name for the time zone that was used to
-compute this broken-down time value. It is a GNU library extension.
+This field is the name for the time zone that was used to compute this
+broken-down time value. Like @code{tm_gmtoff}, this field is a BSD and
+GNU extension, and is not visible in a strict ANSI C environment.
@end table
@end deftp
@@ -538,7 +540,7 @@ Zone Functions}.
@deftypefun {struct tm *} gmtime (const time_t *@var{time})
This function is similar to @code{localtime}, except that the broken-down
time is expressed as Coordinated Universal Time (UTC)---that is, as
-Greenwich Mean Time (GMT) rather than relative to the local time zone.
+Greenwich Mean Time (GMT)---rather than relative to the local time zone.
Recall that calendar times are @emph{always} expressed in coordinated
universal time.
@@ -728,10 +730,9 @@ The hour and minute in decimal numbers using the format @code{%H:%M}.
This format is a GNU extension.
@item %s
-The seconds since the epoch, i.e., 1 January 1970 00:00:00 UTC. Note
+The seconds since the epoch, i.e., 1970-01-01 00:00:00 UTC. Note
that this value is the number of seconds between the epoch and the
-current date as defined by the @code{localtime} system call. It is not
-changed by the @code{--date} option.
+current date as defined by the @code{localtime} system call.
This format is a GNU extension.
@@ -754,11 +755,14 @@ the first Sunday as the first day of the first week. All days preceding
the first Sunday in the year are considered to be in week @code{0}.
@item %V
-The week number of the current year as a decimal number, starting with
-the first Monday as the first day of the first week. If the week
-containing January 1 has four or more days in the new year it is
-considered to be week @code{1}. Otherwise it is week @code{53} of the
-previous year. This is standardized in @w{ISO 8601:1988}.
+The @w{ISO 8601:1988} week number as a decimal number (range @code{00}
+to @code{53}). ISO weeks start with Monday and end with Sunday. Week
+01 of a year is the first week which has the majority of its days in
+that year; this is equivalent to the week containing the year's first
+Thursday, and it is also equivalent to the week containing January 4.
+Week 01 of a year can contain days from the previous year. The week
+before week 01 of a year is the last week (52 or 53) of the previous
+year even if it contains days from the new year.
@item %w
The day of the week as a decimal number, Sunday being @code{0}.
@@ -783,10 +787,9 @@ The year as a decimal number, but without a century (range @code{00} to
The year as a decimal number, including the century.
@item %z
-@w{RFC 822}/@w{ISO 8601:1988} style numeric time zone (e.g., -0600 or
-+0100), or nothing if no time zone is determinable. This value reflects
-the @emph{current} time zone. It is not changed by the @code{--date}
-option.
+@w{RFC 822}/@w{ISO 8601:1988} style numeric time zone (e.g.,
+@code{-0600} or @code{+0100}), or nothing if no time zone is
+determinable.
@item %Z
The time zone or name or abbreviation (empty if the time zone can't be
@@ -822,9 +825,9 @@ for accessing the time zone are declared in @file{time.h}.
@cindex time zone
You should not normally need to set @code{TZ}. If the system is
-configured properly, the default timezone will be correct. You might
+configured properly, the default time zone will be correct. You might
set @code{TZ} if you are using a computer over the network from a
-different timezone, and would like times reported to you in the timezone
+different time zone, and would like times reported to you in the time zone
that local for you, rather than what is local for the computer.
In POSIX.1 systems the value of the @code{TZ} variable can be of one of
@@ -858,7 +861,7 @@ negative if it is east. The hour must be between @code{0} and
@code{23}, and the minute and seconds between @code{0} and @code{59}.
For example, here is how we would specify Eastern Standard Time, but
-without any daylight savings time alternative:
+without any daylight saving time alternative:
@smallexample
EST+5
@@ -872,11 +875,11 @@ The second format is used when there is Daylight Saving Time:
The initial @var{std} and @var{offset} specify the standard time zone, as
described above. The @var{dst} string and @var{offset} specify the name
-and offset for the corresponding daylight savings time time zone; if the
+and offset for the corresponding daylight saving time time zone; if the
@var{offset} is omitted, it defaults to one hour ahead of standard time.
-The remainder of the specification describes when daylight savings time is
-in effect. The @var{start} field is when daylight savings time goes into
+The remainder of the specification describes when daylight saving time is
+in effect. The @var{start} field is when daylight saving time goes into
effect and the @var{end} field is when the change is made back to standard
time. The following formats are recognized for these fields:
@@ -904,16 +907,16 @@ effect, the change to the other time occurs. If omitted, the default is
For example, here is how one would specify the Eastern time zone in the
United States, including the appropriate daylight saving time and its dates
-of applicability. The normal offset from GMT is 5 hours; since this is
+of applicability. The normal offset from UTC is 5 hours; since this is
west of the prime meridian, the sign is positive. Summer time begins on
the first Sunday in April at 2:00am, and ends on the last Sunday in October
at 2:00am.
@smallexample
-EST+5EDT,M4.1.0/M10.5.0
+EST+5EDT,M4.1.0/2,M10.5.0/2
@end smallexample
-The schedule of daylight savings time in any particular jurisdiction has
+The schedule of daylight saving time in any particular jurisdiction has
changed over the years. To be strictly correct, the conversion of dates
and times in the past should be based on the schedule that was in effect
then. However, this format has no facilities to let you specify how the
@@ -967,15 +970,25 @@ community of volunteers and put in the public domain.
@deftypevar char * tzname [2]
The array @code{tzname} contains two strings, which are the standard
names of the pair of time zones (standard and daylight
-savings) that the user has selected. @code{tzname[0]} is the name of
+saving) that the user has selected. @code{tzname[0]} is the name of
the standard time zone (for example, @code{"EST"}), and @code{tzname[1]}
-is the name for the time zone when daylight savings time is in use (for
+is the name for the time zone when daylight saving time is in use (for
example, @code{"EDT"}). These correspond to the @var{std} and @var{dst}
-strings (respectively) from the @code{TZ} environment variable.
+strings (respectively) from the @code{TZ} environment variable. If
+daylight saving time is never used, @code{tzname[1]} is the empty string.
The @code{tzname} array is initialized from the @code{TZ} environment
variable whenever @code{tzset}, @code{ctime}, @code{strftime},
-@code{mktime}, or @code{localtime} is called.
+@code{mktime}, or @code{localtime} is called. If multiple abbreviations
+have been used (e.g. @code{"EWT"} and @code{"EDT"} for U.S. Eastern War
+Time and Eastern Daylight Time), the array contains the most recent
+abbreviation.
+
+The @code{tzname} array is required for POSIX.1 compatibility, but in
+GNU programs it is better to use the @code{tm_zone} member of the
+broken-down time structure, since @code{tm_zone} reports the correct
+abbreviation even when it is not the latest one.
+
@end deftypevar
@comment time.h
@@ -989,14 +1002,19 @@ depend on the time zone.
@end deftypefun
The following variables are defined for compatibility with System V
-Unix. These variables are set by calling @code{tzset}.
+Unix. Like @code{tzname}, these variables are set by calling
+@code{tzset} or the other time conversion functions.
@comment time.h
@comment SVID
@deftypevar {long int} timezone
-This contains the difference between GMT and local standard time, in
-seconds. For example, in the U.S. Eastern time zone, the value is
-@code{5*60*60}.
+This contains the difference between UTC and the latest local standard
+time, in seconds west of UTC. For example, in the U.S. Eastern time
+zone, the value is @code{5*60*60}. Unlike the @code{tm_gmtoff} member
+of the broken-down time structure, this value is not adjusted for
+daylight saving, and its sign is reversed. In GNU programs it is better
+to use @code{tm_gmtoff}, since it contains the correct offset even when
+it is not the latest one.
@end deftypevar
@comment time.h