summaryrefslogtreecommitdiff
path: root/lisp/timezone.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-12-26 01:24:38 +0000
committerRichard M. Stallman <rms@gnu.org>1994-12-26 01:24:38 +0000
commit866c7729ff9ee420d22b581d8f4ceb7f017e871b (patch)
treeee9703803d191b52955eaedc58321684049aeafc /lisp/timezone.el
parent566faa90021f51b839661cba93f2d8e978d686ad (diff)
downloademacs-866c7729ff9ee420d22b581d8f4ceb7f017e871b.tar.gz
(timezone-fix-time): For year values < 50, add 2000.
Diffstat (limited to 'lisp/timezone.el')
-rw-r--r--lisp/timezone.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/timezone.el b/lisp/timezone.el
index 56dbff02b5b..5e0fd7f105b 100644
--- a/lisp/timezone.el
+++ b/lisp/timezone.el
@@ -291,7 +291,11 @@ If LOCAL is nil, it is assumed to be GMT.
If TIMEZONE is nil, use the local time zone."
(let* ((date (timezone-parse-date date))
(year (string-to-int (aref date 0)))
- (year (if (< year 100) (+ year 1900) year))
+ (year (cond ((< year 50)
+ (+ year 2000))
+ ((< year 100)
+ (+ year 1900))
+ (t year)))
(month (string-to-int (aref date 1)))
(day (string-to-int (aref date 2)))
(time (timezone-parse-time (aref date 3)))