PROBLEM:  ( TKTQ22519, UVO104025, QAR 45258 ) (Patch ID: OSF350-255)
********
Identifying limitations of original date command
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The date command was not able to accurately set the date past the year
1999.  For example:

	Display current date:
	$ date
	Tue Jul 16 11:01:50 EDT 1996

	Attempt to set the date to 12:55 PM, January 1, 2000
	$ date 0101125500
	Thu Feb  7 19:24:02 EST 2036

Enhancements to the date command for Year 2000 support
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

The date command has been enhanced to support setting the system date
past the year 1999, providing customers with the ability to begin
testing their software for potential century rollover problems.  The
changes are outlined in the following sections.

Syntax

	The following formats are valid for setting the system date
	using the date command.

	Using the XPG4-UNIX format:

	date mmddHHMM[yy]

	Using one of three Digital formats:

	date mmddHHMM[[cc]yy][.ss]
	date [[cc]yy]mmddHHMM[.ss]
	date mmddHHMM[.ss[[cc]yy]]

	The following definitions apply:

	mm   is the month number
	dd   is the number of the day in the month
	HH   is the hour in the day
	MM   is the number of minutes
	ss   is the number of seconds
	yy   is the last two digits of the year
	cc   is the first two digits of the year

	Note that the LC_TIME variable, if it is defined, controls the
	ordering of the day (dd) and month (mm) numbers in these
	formats.  The default order is the month (mm) followed by the
	day (dd).

Optional Century [cc] Input

	Each of the Digital formats for the date command allow the
	optional input of the century (first two digits of the year).
	This century field is optional to ensure that input formats
	previously accepted by the date command are still supported.

	Currently, the XPG4-UNIX format mmddHHMM[yy] does not have a
	century field.  This is consistent with current X/Open
	specifications regarding the date command.  The century field
	will be added to this format in a future release of Digital
	UNIX once this new field is officially supported in future
	revisions of X/Open's UNIX specification.

Handling of Two-Digit Year Input

	When the year is specified by using two digits (as in the
	XPG4-UNIX format or when the [cc] field is omitted from the
	Digital formats), the century is determined in the following
	manner: if the specified two-digit year is between 69 and 99
	inclusive, the 20th century is assumed (that is, 19yy),
	otherwise the 21st century is assumed (that is, 20yy).

	The algorithm above is consistent with current drafts of
	forthcoming X/Open UNIX specifications regarding two-digit
	year handling in various system interfaces and commands,
	including the date command.  This algorithm is based on the
	standard UNIX epoch (12:00:00 AM Jan 1, 1970 UTC), minus one
	year to account for different time zones.  Internal UNIX time
	handling is based on the number of seconds since this epoch.

Handling of Ambiguous Input

	If the input string is ambiguous, that is, if the format
	cannot be conclusively determined from the data, the date
	command will issue a warning to STDERR and assume the
	mmddHHMM[[cc]yy][.ss] format.  To avoid ambiguous input, use
	one of the three Digital formats and specify the [cc] field.

Examples

	To set the date to 09:34:00 AM Jan 7, 2000:

	Using the mmddHHMM[yy] XPG4-UNIX format:

	# date 0107093400

	Using the mmddHHMM[[cc]yy][.ss] Digital format:

	# date 010709342000
	# date 0107093400.00
	# date 010709342000.00

	Using the [[cc]yy]mmddHHMM[.ss] Digital format:

	# date 0001070934
	# date 200001070934
	# date 200001070934.00

	Using the mmddHHMM[.ss[[cc]yy]] Digital format:

	# date 01070934.0000
	# date 01070934.002000

	An example of ambiguous input:

	# date 0101010000

	This input could be recognized as one of the following
	formats:

	mmddHHMM[[cc]yy][.ss]   meaning 01:00:00 AM Jan 1, 2000
	[[cc]yy]mmddHHMM[.ss]   meaning 12:00:00 AM Jan 1, 2001

	In this case, the date command will display a warning and
	assume the mmddHHMM[[cc]yy][.ss] format, setting the date to
	01:00:00 AM Jan 1, 2000.


PROBLEM:        (QAR 50276, QAR 53348)  (Patch ID: OSF350-431)
********
This patch fixes a problem in which the 'date' command is unable to
set the date to January 1, 1970 00:00:00 GMT or February 29, 2000.

To reproduce the problem, do the following:

root# TZ=:GMT ; export TZ
root# date 01010000.0070


FILE(s):

/sbin/date				subset OSFBASE350
CHECKSUM: 44372    288	RCSfile: date.c		RCS: 4.2.33.3
/usr/bin/date				subset OSFBASE350
CHECKSUM: 00682     24	RCSfile: date.c		RCS: 4.2.33.3
/usr/lib/nls/msg/en_US.ISO8859-1/date.cat   subset OSFBASE350
CHECKSUM: 30685      1
