Bug 9323 - year 2000 problem with /usr/bin/touch
Summary: year 2000 problem with /usr/bin/touch
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 2.2.7-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 1999-01-05 08:30 UTC by ishisone
Modified: 1999-01-05 10:02 UTC (History)
0 users

See Also:


Attachments
file.diff (619 bytes, patch)
1999-01-05 08:30 UTC, ishisone
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ishisone 1999-01-05 08:30:01 UTC
  When used in its obsolescent form (where the time is specified as the
  first argument), /usr/bin/touch doesn't treat the two-digit year
  specification correctly.  Years in the range of 00-68 should be treated
  as 2000-2068 according to the online manual, but actually they are
  treated as 1900-1968.

  Here's an excerpt from the manual's `COMPATIBILITY' section:
	If the ``YY'' letter pair is in the range 69 to 99, the year
	is set to 1969 to 1999, otherwise, the year is set in the 21st
	century.

How-To-Repeat: 
  Try following commands.  You'll find that the modification time of
  the file is 1910, not 2010.

	% touch 0101000010 /tmp/touchme
	% ls -l /tmp/touchme
Comment 1 danny freebsd_committer freebsd_triage 1999-01-05 10:01:58 UTC
State Changed
From-To: open->closed

Patch applied with minor mod.  Thanks.