Mercurial > hg > xemacs-beta
diff lisp/utils/timezone.el @ 82:6a378aca36af r20-0b91
Import from CVS: tag r20-0b91
author | cvs |
---|---|
date | Mon, 13 Aug 2007 09:07:36 +0200 |
parents | 131b0175ea99 |
children | 364816949b59 |
line wrap: on
line diff
--- a/lisp/utils/timezone.el Mon Aug 13 09:06:45 2007 +0200 +++ b/lisp/utils/timezone.el Mon Aug 13 09:07:36 2007 +0200 @@ -191,7 +191,16 @@ (substring date (match-beginning year) (match-end year))) ;; It is now Dec 1992. 8 years before the end of the World. (if (< (length year) 4) - (setq year (concat "19" (substring year -2 nil)))) + ;; 2 digit years are bogus, so guess the century + (let ((yr (string-to-int year))) + (when (>= yr 100) + ;; What does a three digit year mean? + (setq yr (- yr 100))) + (setq year (format "%d%02d" + (if (< yr 70) + 20 + 19) + yr)))) (let ((string (substring date (match-beginning month) (+ (match-beginning month) 3))))