Use the spelling "timestamp", as that is what POSIX uses.
#! /bin/sh
# Print a version string.
-scriptversion=2016-11-03.18; # UTC
+scriptversion=2017-01-09.19; # UTC
# Bootstrap this package from checked-out sources.
# Leave any existing symlink alone, if it already points to the source,
# so that broken build tools that care about symlink times
# aren't confused into doing unnecessary builds. Conversely, if the
- # existing symlink's time stamp is older than the source, make it afresh,
+ # existing symlink's timestamp is older than the source, make it afresh,
# so that broken tools aren't confused into skipping needed builds. See
# <http://lists.gnu.org/archive/html/bug-gnulib/2011-05/msg00326.html>.
test -h "$dst" &&
#!/bin/sh
# Print a version string.
-scriptversion=2016-05-08.18; # UTC
+scriptversion=2017-01-09.19; # UTC
# Copyright (C) 2007-2017 Free Software Foundation, Inc.
#
# string we're using came from git. I.e., skip the test if it's "UNKNOWN"
# or if it came from .tarball-version.
if test "x$v_from_git" != x; then
- # Don't declare a version "dirty" merely because a time stamp has changed.
+ # Don't declare a version "dirty" merely because a timestamp has changed.
git update-index --refresh > /dev/null 2>&1
dirty=`exec 2>/dev/null;git diff-index --name-only HEAD` || dirty=
@noindent
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
-HP-UX @command{make} updates targets which have the same time stamps as
+HP-UX @command{make} updates targets which have the same timestamps as
their prerequisites, which makes it generally unusable when shipped
generated files such as @command{configure} are involved. Use GNU
@command{make} instead.
described in the previous section.
If neither a time zone item nor a time zone correction is supplied,
-time stamps are interpreted using the rules of the default time zone
+timestamps are interpreted using the rules of the default time zone
(@pxref{Specifying time zone rules}).
@node Seconds since the Epoch
@section Seconds since the Epoch
-If you precede a number with @samp{@@}, it represents an internal time
-stamp as a count of seconds. The number can contain an internal
+If you precede a number with @samp{@@}, it represents an internal
+timestamp as a count of seconds. The number can contain an internal
decimal point (either @samp{.} or @samp{,}); any excess precision not
supported by the internal representation is truncated toward minus
infinity. Such a number cannot be combined with any other date
-item, as it specifies a complete time stamp.
+item, as it specifies a complete timestamp.
@cindex beginning of time, for POSIX
@cindex epoch, for POSIX
@item
The @code{ctime} function need not be reentrant, and consequently is
not required to be thread safe. Implementations of @code{ctime}
-typically write the time stamp into static buffer. If two threads
+typically write the timestamp into static buffer. If two threads
call @code{ctime} at roughly the same time, you might end up with the
wrong date in one of the threads, or some undefined string. There is
a re-entrant interface @code{ctime_r}.
@item
The @code{inet_ntoa} function need not be reentrant, and consequently
is not required to be thread safe. Implementations of
-@code{inet_ntoa} typically write the time stamp into static buffer.
+@code{inet_ntoa} typically write the timestamp into static buffer.
If two threads call @code{inet_ntoa} at roughly the same time, you
might end up with the wrong date in one of the threads, or some
undefined string.
#include <fcntl.h>
#include <sys/stat.h>
-/* Set the access and modification time stamps of FD (a.k.a. FILE) to be
+/* Set the access and modification timestamps of FD (a.k.a. FILE) to be
TIMESPEC[0] and TIMESPEC[1], respectively; relative to directory DIR.
FD must be either negative -- in which case it is ignored --
or a file descriptor that is open on FILE.
If FD is nonnegative, then FILE can be NULL, which means
use just futimes (or equivalent) instead of utimes (or equivalent),
and fail if on an old system without futimes (or equivalent).
- If TIMESPEC is null, set the time stamps to the current time.
+ If TIMESPEC is null, set the timestamps to the current time.
ATFLAG is passed to utimensat if FD is negative or futimens was
unsupported, which can allow operation on FILE as a symlink.
Return 0 on success, -1 (setting errno) on failure. */
#include "utimens.h"
-/* Set the access and modification time stamps of FD to be
+/* Set the access and modification timestamps of FD to be
TIMESPEC[0] and TIMESPEC[1], respectively.
Fail with ENOSYS on systems without futimes (or equivalent).
- If TIMESPEC is null, set the time stamps to the current time.
+ If TIMESPEC is null, set the timestamps to the current time.
Return 0 on success, -1 (setting errno) on failure. */
int
futimens (int fd, struct timespec const times[2])
/* Return an integer value measuring (YEAR1-YDAY1 HOUR1:MIN1:SEC1) -
(YEAR0-YDAY0 HOUR0:MIN0:SEC0) in seconds, assuming that the clocks
- were not adjusted between the time stamps.
+ were not adjusted between the timestamps.
The YEAR values uses the same numbering as TP->tm_year. Values
need not be in the usual range. However, YEAR1 must not overflow
-/* Parse a string into an internal time stamp.
+/* Parse a string into an internal timestamp.
Copyright (C) 1995, 1997-1998, 2003-2004, 2007, 2009-2017 Free Software
Foundation, Inc.
%{
-/* Parse a string into an internal time stamp.
+/* Parse a string into an internal timestamp.
Copyright (C) 1999-2000, 2002-2017 Free Software Foundation, Inc.
Modified by Paul Eggert <eggert@twinsun.com> in August 1999 to do
the right thing about local DST. Also modified by Paul Eggert
<eggert@cs.ucla.edu> in February 2004 to support
- nanosecond-resolution time stamps, and in October 2004 to support
+ nanosecond-resolution timestamps, and in October 2004 to support
TZ strings in dates. */
/* FIXME: Check for arithmetic overflow in all cases, not just
};
/* The universal time zone table. These labels can be used even for
- time stamps that would not otherwise be valid, e.g., GMT time
- stamps in London during summer. */
+ timestamps that would not otherwise be valid, e.g., GMT timestamps
+ oin London during summer. */
static table const universal_time_zone_table[] =
{
{ "GMT", tZONE, HOUR ( 0) }, /* Greenwich Mean */
{
if (t == (time_t) -1)
{
- /* Guard against falsely reporting an error when parsing a time
- stamp that happens to equal (time_t) -1, on a host that
- supports such a time stamp. */
+ /* Guard against falsely reporting an error when parsing a
+ timestamp that happens to equal (time_t) -1, on a host that
+ supports such a timestamp. */
tm1 = localtime (&t);
if (!tm1)
return false;
dbg_printf ("warning: using midnight as starting time: 00:00:00\n");
}
- /* Let mktime deduce tm_isdst if we have an absolute time stamp. */
+ /* Let mktime deduce tm_isdst if we have an absolute timestamp. */
if (pc.dates_seen | pc.days_seen | pc.times_seen)
tm.tm_isdst = -1;
|| defined HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC)
/* FreeBSD and NetBSD sometimes signal the absence of knowledge by
using zero. Attempt to work around this problem. Alas, this can
- report failure even for valid time stamps. Also, NetBSD
+ report failure even for valid timestamps. Also, NetBSD
sometimes returns junk in the birth time fields; work around this
bug if it is detected. */
if (! (t.tv_sec && 0 <= t.tv_nsec && t.tv_nsec < 1000000000))
_GL_CXXALIASWARN (gmtime);
# endif
-/* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store
+/* Parse BUF as a timestamp, assuming FORMAT specifies its layout, and store
the resulting broken-down time into TM. See
<http://www.opengroup.org/susv3xsh/strptime.html>. */
# if @GNULIB_STRPTIME@
# define _GL_TIMESPEC_INLINE _GL_INLINE
#endif
-/* Resolution of timespec time stamps (in units per second), and log
+/* Resolution of timespec timestamps (in units per second), and log
base 10 of the resolution. */
enum { TIMESPEC_RESOLUTION = 1000000000 };
/* Return negative, zero, positive if A < B, A == B, A > B, respectively.
- For each time stamp T, this code assumes that either:
+ For each timestamp T, this code assumes that either:
* T.tv_nsec is in the range 0..999999999; or
* T.tv_sec corresponds to a valid leap second on a host that supports
* T.tv_sec is the minimum time_t value and T.tv_nsec is -1; or
T.tv_sec is the maximum time_t value and T.tv_nsec is 2000000000.
This allows for special struct timespec values that are less or
- greater than all possible valid time stamps.
+ greater than all possible valid timestamps.
In all these cases, it is safe to subtract two tv_nsec values and
convert the result to integer without worrying about overflow on
-/* utimecmp.c -- compare file time stamps
+/* utimecmp.c -- compare file timestamps
Copyright (C) 2004-2007, 2009-2017 Free Software Foundation, Inc.
enum { SYSCALL_RESOLUTION = BILLION };
#endif
-/* Describe a file system and its time stamp resolution in nanoseconds. */
+/* Describe a file system and its timestamp resolution in nanoseconds. */
struct fs_res
{
/* Device number of file system. */
dev_t dev;
- /* An upper bound on the time stamp resolution of this file system,
+ /* An upper bound on the timestamp resolution of this file system,
ignoring any resolution that cannot be set via utimens. It is
represented by an integer count of nanoseconds. It must be
either 2 billion, or a power of 10 that is no greater than a
If OPTIONS & UTIMECMP_TRUNCATE_SOURCE, do the comparison after SRC is
converted to the destination's timestamp resolution as filtered through
utimens. In this case, return -2 if the exact answer cannot be
- determined; this can happen only if the time stamps are very close and
+ determined; this can happen only if the timestamps are very close and
there is some trouble accessing the file system (e.g., the user does not
- have permission to futz with the destination's time stamps). */
+ have permission to futz with the destination's timestamps). */
int
utimecmp (char const *dst_name,
verify (TYPE_IS_INTEGER (time_t));
- /* Destination and source time stamps. */
+ /* Destination and source timestamps. */
time_t dst_s = dst_stat->st_mtime;
time_t src_s = src_stat->st_mtime;
int dst_ns = get_stat_mtime_ns (dst_stat);
if (options & UTIMECMP_TRUNCATE_SOURCE)
{
- /* Look up the time stamp resolution for the destination device. */
+ /* Look up the timestamp resolution for the destination device. */
/* Hash table for caching information learned about devices. */
static Hash_table *ht;
struct fs_res *dst_res = NULL;
struct fs_res tmp_dst_res;
- /* Time stamp resolution in nanoseconds. */
+ /* timestamp resolution in nanoseconds. */
int res;
/* Quick exit, if possible. Since the worst resolution is 2
struct timespec timespec[2];
struct stat dst_status;
- /* Ignore source time stamp information that must necessarily
+ /* Ignore source timestamp information that must necessarily
be lost when filtered through utimens. */
src_ns -= src_ns % SYSCALL_RESOLUTION;
- /* If the time stamps disagree widely enough, there's no need
- to interrogate the file system to deduce the exact time
- stamp resolution; return the answer directly. */
+ /* If the timestamps disagree widely enough, there's no need
+ to interrogate the file system to deduce the exact
+ timestamp resolution; return the answer directly. */
{
time_t s = src_s & ~ (res == 2 * BILLION ? 1 : 0);
if (src_s < dst_s || (src_s == dst_s && src_ns <= dst_ns))
return -1;
}
- /* Determine the actual time stamp resolution for the
+ /* Determine the actual timestamp resolution for the
destination file system (after truncation due to
- SYSCALL_RESOLUTION) by setting the access time stamp of the
+ SYSCALL_RESOLUTION) by setting the access timestamp of the
destination to the existing access time, except with
trailing nonzero digits. */
dst_res->exact = true;
}
- /* Truncate the source's time stamp according to the resolution. */
+ /* Truncate the source's timestamp according to the resolution. */
src_s &= ~ (res == 2 * BILLION ? 1 : 0);
src_ns -= src_ns % res;
}
- /* Compare the time stamps and return -1, 0, 1 accordingly. */
+ /* Compare the timestamps and return -1, 0, 1 accordingly. */
return (dst_s < src_s ? -1
: dst_s > src_s ? 1
: dst_ns < src_ns ? -1
-/* utimecmp.h -- compare file time stamps
+/* utimecmp.h -- compare file timestamps
Copyright (C) 2004, 2009-2017 Free Software Foundation, Inc.
/* Options for utimecmp. */
enum
{
- /* Before comparing, truncate the source time stamp to the
+ /* Before comparing, truncate the source timestamp to the
resolution of the destination file system and to the resolution
of utimens. */
UTIMECMP_TRUNCATE_SOURCE = 1
return false;
}
-/* Set the access and modification time stamps of FD (a.k.a. FILE) to be
+/* Set the access and modification timestamps of FD (a.k.a. FILE) to be
TIMESPEC[0] and TIMESPEC[1], respectively.
FD must be either negative -- in which case it is ignored --
or a file descriptor that is open on FILE.
If FD is nonnegative, then FILE can be NULL, which means
use just futimes (or equivalent) instead of utimes (or equivalent),
and fail if on an old system without futimes (or equivalent).
- If TIMESPEC is null, set the time stamps to the current time.
+ If TIMESPEC is null, set the timestamps to the current time.
Return 0 on success, -1 (setting errno) on failure. */
int
return -1;
}
- /* Some Linux-based NFS clients are buggy, and mishandle time stamps
+ /* Some Linux-based NFS clients are buggy, and mishandle timestamps
of files in NFS file systems in some cases. We have no
configure-time test for this, but please see
<http://bugs.gentoo.org/show_bug.cgi?id=132673> for references to
}
}
-/* Set the access and modification time stamps of FILE to be
+/* Set the access and modification timestamps of FILE to be
TIMESPEC[0] and TIMESPEC[1], respectively. */
int
utimens (char const *file, struct timespec const timespec[2])
return fdutimens (-1, file, timespec);
}
-/* Set the access and modification time stamps of FILE to be
+/* Set the access and modification timestamps of FILE to be
TIMESPEC[0] and TIMESPEC[1], respectively, without dereferencing
symlinks. Fail with ENOSYS if the platform does not support
changing symlink timestamps, but FILE was a symlink. */
#endif /* !HAVE_UTIMENSAT */
-/* Set the access and modification time stamps of FILE to be
+/* Set the access and modification timestamps of FILE to be
TIMESPEC[0] and TIMESPEC[1], respectively; relative to directory
FD. If flag is AT_SYMLINK_NOFOLLOW, change the times of a symlink,
or fail with ENOSYS if not possible. If TIMESPEC is null, set the
- time stamps to the current time. If possible, do it without
+ timestamps to the current time. If possible, do it without
changing the working directory. Otherwise, resort to using
save_cwd/fchdir, then utimens/restore_cwd. If either the save_cwd
or the restore_cwd fails, then give a diagnostic and exit nonzero.
-/* xtime -- extended-resolution integer time stamps
+/* xtime -- extended-resolution integer timestamps
Copyright (C) 2005-2006, 2009-2017 Free Software Foundation, Inc.
# define XTIME_INLINE _GL_INLINE
#endif
-/* xtime_t is a signed type used for time stamps. It is an integer
+/* xtime_t is a signed type used for timestamps. It is an integer
type that is a count of nanoseconds -- except for obsolescent hosts
without sufficiently-wide integers, where it is a count of
seconds. */
Description:
-compare file time stamps
+compare file timestamps
Files:
lib/utimecmp.h
{ "12131415", 13, 1, 0}, /* ??? Dec 13 14:15:00 ???? */
/* These two tests fail on 64-bit Solaris up through at least
- Solaris 10, which is off by one day for time stamps before
+ Solaris 10, which is off by one day for timestamps before
0001-01-01 00:00:00 UTC. */
{ "000001010000.00", 13, 1,
- INT64_C (62167219200)},/* Sat Jan 1 00:00:00 0 */