Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src/bin/date
Module Name: src
Committed By: kre
Date: Tue Sep 17 15:25:39 UTC 2024
Modified Files:
src/bin/date: date.1 date.c
Log Message:
date(1) says:
STANDARDS
The date utility is expected to be compatible with IEEE Std 1003.2
(“POSIX.2”).
yet the format used for the date string arg is:
[[[[[[CC]yy]mm]dd]HH]MM[.SS]]
whereas POSIX demands
mmddHHMM[[CC]yy]
Why anyone would ever want to use that archaic form is incomprehensible
to me, yet, that is what is required.
Implement support for the POSIX format if POSIXLY_CORRECT is set in
the environment (in the full date(1) build only) in a rather crude
way that relies upon the user getting the format correct.
Tools builds are unaffected - setting the time is not supported there.
(It could be made to work, half setting the time, using -j, is possible
in tools builds, but pointless, and this cheap implementation uses
strptime() which is not necessarily available to a tools build.)
Mention this (very briefly) in the man page.
To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/bin/date/date.1
cvs rdiff -u -r1.69 -r1.70 src/bin/date/date.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index