summaryrefslogtreecommitdiffstats
path: root/bin/date
diff options
context:
space:
mode:
authormtm <mtm@FreeBSD.org>2004-03-04 15:46:14 +0000
committermtm <mtm@FreeBSD.org>2004-03-04 15:46:14 +0000
commit89c298d8ab9bdf7e1b4575ac9a727a884087f66b (patch)
tree2f96515a9b600f4696f11157cd6a3c5d7e1217ad /bin/date
parentb924bcd14423c7d465eaaa04aa306009a1eceed5 (diff)
downloadFreeBSD-src-89c298d8ab9bdf7e1b4575ac9a727a884087f66b.zip
FreeBSD-src-89c298d8ab9bdf7e1b4575ac9a727a884087f66b.tar.gz
Rev. 1.32 moved a comment to the wrong line. The hack refered to
in the comment applies to a decision that needs to be made in relation to the year 2000. In fact, that statement probably should be changed to be more generic (getting the year from the current time perhaps). Otherwise, starting in 2069 two digit year conversions in date(1) will start assuming 1900 instead of 2000. hehe.
Diffstat (limited to 'bin/date')
-rw-r--r--bin/date/date.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/date/date.c b/bin/date/date.c
index c71f9d3..e0f8a6f 100644
--- a/bin/date/date.c
+++ b/bin/date/date.c
@@ -234,9 +234,9 @@ setthetime(const char *fmt, const char *p, int jflag, int nflag)
case 10: /* yy */
if (century)
lt->tm_year += ATOI2(p);
- else { /* hack for 2000 ;-} */
+ else {
lt->tm_year = ATOI2(p);
- if (lt->tm_year < 69)
+ if (lt->tm_year < 69) /* hack for 2000 ;-} */
lt->tm_year += 2000 - TM_YEAR_BASE;
else
lt->tm_year += 1900 - TM_YEAR_BASE;
OpenPOWER on IntegriCloud