diff options
author | Peter Wemm <peter@FreeBSD.org> | 1999-12-11 12:24:21 +0000 |
---|---|---|
committer | Peter Wemm <peter@FreeBSD.org> | 1999-12-11 12:24:21 +0000 |
commit | d81819680486521a84c8aecc540ed04ba315dec0 (patch) | |
tree | 2a59869a343a5d43c01370f1083d67c2a02785a0 /contrib/cvs/lib/getdate.y | |
parent | 0008866e589b5dd29f5332c9bc0e208ba10a7772 (diff) |
Import cvs-1.10.7. There are a number of nasty bugs that have been fixed.
Obtained from: cyclic.com
Notes
Notes:
svn path=/vendor/cvs/dist/; revision=54427
Diffstat (limited to 'contrib/cvs/lib/getdate.y')
-rw-r--r-- | contrib/cvs/lib/getdate.y | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/contrib/cvs/lib/getdate.y b/contrib/cvs/lib/getdate.y index fdb177d04c1c..9a4a8fae6580 100644 --- a/contrib/cvs/lib/getdate.y +++ b/contrib/cvs/lib/getdate.y @@ -619,6 +619,10 @@ ToSeconds(Hours, Minutes, Seconds, Meridian) } +/* Year is either + * A negative number, which means to use its absolute value (why?) + * A number from 0 to 99, which means a year from 1900 to 1999, or + * The actual year (>=100). */ static time_t Convert(Month, Day, Year, Hours, Minutes, Seconds, Meridian, DSTmode) time_t Month; @@ -710,7 +714,7 @@ RelativeMonth(Start, RelMonth) if (RelMonth == 0) return 0; tm = localtime(&Start); - Month = 12 * tm->tm_year + tm->tm_mon + RelMonth; + Month = 12 * (tm->tm_year + 1900) + tm->tm_mon + RelMonth; Year = Month / 12; Month = Month % 12 + 1; return DSTcorrect(Start, |