@c GNU date syntax documentation
-@c Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-@c 2004, 2005, 2006, 2009, 2010 Free Software Foundation, Inc.
+@c Copyright (C) 1994-2006, 2009-2011 Free Software Foundation, Inc.
@c Permission is granted to copy, distribute and/or modify this document
@c under the terms of the GNU Free Documentation License, Version 1.3 or
* Calendar date items:: 19 Dec 1994.
* Time of day items:: 9:20pm.
* Time zone items:: @sc{est}, @sc{pdt}, @sc{gmt}.
+* Combined date and time of day items:: 1972-09-24T20:02:00,000000-0500
* Day of week items:: Monday and others.
* Relative items in date strings:: next tuesday, 2 years ago.
* Pure numbers in date strings:: 19931219, 1440.
@item calendar date items
@item time of day items
@item time zone items
+@item combined date and time of day items
@item day of the week items
@item relative items
@item pure numbers.
Mon Mar 1 00:21:42 UTC 2004
$ TZ=UTC0 date +'%Y-%m-%d %H:%M:%SZ'
2004-03-01 00:21:42Z
-$ date --iso-8601=ns | tr T ' ' # --iso-8601 is a GNU extension.
-2004-02-29 16:21:42,692722128-0800
+$ date --rfc-3339=ns # --rfc-3339 is a GNU extension.
+2004-02-29 16:21:42.692722128-08:00
$ date --rfc-2822 # a GNU extension
Sun, 29 Feb 2004 16:21:42 -0800
$ date +'%Y-%m-%d %H:%M:%S %z' # %z is a GNU extension.
(@pxref{Specifying time zone rules}).
+@node Combined date and time of day items
+@section Combined date and time of day items
+
+@cindex combined date and time of day item
+
+A @dfn{combined date and time of day item} specifies the time on a
+specific day of the year. This type is needed for formats that cannot
+be represented by individual calendar date (@pxref{Calendar date items})
+and time of day (@pxref{Time of day items}) items due to ambiguity.
+
+@example
+# ISO 8601 extended date and time of day format
+1972-09-24T20:02:00,000000-0500
+@end example
+
+@cindex @sc{iso} 8601 date and time of day format
+@cindex date and time of day format, @sc{iso} 8601
+
+The @sc{iso} 8601 extended date and time of day format is an @sc{iso}
+8601 date, a @samp{T} character separator, followed by an @sc{iso} 8601 time
+of day.
+
+
@node Day of week items
@section Day of week items
@cindex MacKenzie, David
@cindex Meyering, Jim
@cindex Eggert, Paul
-@code{parse_datetime} was originally implemented by Steven M. Bellovin
+@code{parse_datetime} started life as @code{getdate}, as originally
+implemented by Steven M. Bellovin
(@email{smb@@research.att.com}) while at the University of North Carolina
at Chapel Hill. The code was later tweaked by a couple of people on
Usenet, then completely overhauled by Rich $alz (@email{rsalz@@bbn.com})
and Jim Berets (@email{jberets@@bbn.com}) in August, 1990. Various
revisions for the @sc{gnu} system were made by David MacKenzie, Jim Meyering,
-Paul Eggert and others, including renaming it to @code{get_date} and
-then to @code{parse_datetime}
-to avoid confusion with the Posix function @code{getdate}.
+Paul Eggert and others, including renaming it to @code{get_date} to
+avoid a conflict with the alternative Posix function @code{getdate},
+and a later rename to @code{parse_datetime}. The Posix function
+@code{getdate} can parse more locale-specific dates using
+@code{strptime}, but relies on an environment variable and external
+file, and lacks the thread-safety of @code{parse_datetime}.
@cindex Pinard, F.
@cindex Berry, K.