Defect report from : Paul Eggert , UCLA
(Please direct followup comments direct to yyyyyyyyyyyyyy@xxxxxxxxxxxxx)
@ page 920 line 35645 section touch -t objection {20060611e}
Problem:
Edition of Specification (Year): 2004
Defect code : 2. Omission
This Aardvark follows up to XSH ERN 138 (Defect in XSH utimes). It
refers to the implication for 'touch -t' of subsecond timestamps.
'touch' cannot set file timestamps to subsecond resolution, other than
by copying them from other files. Existing practice in GNU 'touch' is
to add a new -d option, that uses a ISO 8601 format for doing this.
Another possibility would be to extend the -t format, but its syntax
already has a misleading decimal point so any extension in this area
would be confusing.
Action:
On XCU page 920 line 35645, change:
touch [-acm] [-r ref_file | -t time] file...
to:
touch [-acm] [-r ref_file | -t time | -d date_time] file...
Change lines 35651-35655 from:
The time used can be specified by the -t time option-argument, the
corresponding time fields of the file referenced by the -r ref_file
option-argument, or the date_time operand, as specified in the
following sections. If none of these are specified, touch shall
use the current time (the value returned by the equivalent of the
time() function defined in the System Interfaces volume of
IEEE Std 1003.1-2001).
to:
The time used can be specified by the -t time option-argument, the
corresponding time fields of the file referenced by the -r ref_file
option-argument, or -d date_time option-argument, as specified in
the following sections. If none of these are specified, touch shall
use the current time.
After line 35674 add:
-d date_time
Use the specified date_time instead of the current time.
The option-argument shall be a string of the form:
YYYY-MM-DD^hh:mm:ss[.frac][tz]
where:
YYYY are at least four decimal digits giving the year,
MM, DD, hh, and mm are as with -t time,
ss is the second of the minute [00,59],
^ is a single space,
[.frac] is either empty, or a period ('.') followed
by one or more decimal digits, specifying a fractional second,
[tz] is either empty, signifying local time, or the
letter 'Z', signifying UTC.
If the resulting time precedes the Epoch, the behavior is
implementation-defined. If the time cannot be represented as
the file's timestamp, 'touch' shall exit immediately with an
error status.
|