Lao DanTong wrote:
> John Cowan wrote:
> >Maybe you want to argue that dates without times should mean the first
> >second of the day rather than 00:00:00.
>
> Yes. this makes a lot of sense, don't you think? Notice that date reports
> illegal date for a date specification like --date=2007-10-14+2hours, which
> should be legal and render as 2007-10-14T03:00:00
What should be done for other invalid dates such as Feb 30th?
Bob
BTW... Here is the NEWS item for this change:
* Major changes in release 5.3.0 (2005-01-08) [unstable]
Date syntax as used by date -d, date -f, and touch -d has been
changed as follows:
Dates like `January 32' with out-of-range components are now rejected.
Dates can have fractional time stamps like 2004-02-27 14:19:13.489392193.
Dates can be entered via integer counts of seconds since 1970 when
prefixed by `@'. For example, [EMAIL PROTECTED]' represents 1970-01-01
00:05:21 UTC.
Time zone corrections can now separate hours and minutes with a colon,
and can follow standard abbreviations like "UTC". For example,
"UTC +0530" and "+05:30" are supported, and are both equivalent to "+0530".
Date values can now have leading TZ="..." assignments that override
the environment only while that date is being processed. For example,
the following shell command converts from Paris to New York time:
TZ="America/New_York" date --date='TZ="Europe/Paris" 2004-10-31 06:30'
`date' has a new option --iso-8601=ns that outputs
nanosecond-resolution time stamps.
_______________________________________________
Bug-coreutils mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-coreutils