diff options
| author | Richard M. Stallman | 1994-12-26 01:24:38 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1994-12-26 01:24:38 +0000 |
| commit | 13d76d1ca585fbdc1810970b247a2053a8f3cdcc (patch) | |
| tree | f505a0e9f89dd705c61c6bc1692808e8b1030edf | |
| parent | 448b61c92a3c32c2ce22e4093c9cd9f869856aa9 (diff) | |
| download | emacs-13d76d1ca585fbdc1810970b247a2053a8f3cdcc.tar.gz emacs-13d76d1ca585fbdc1810970b247a2053a8f3cdcc.zip | |
(timezone-fix-time): For year values < 50, add 2000.
| -rw-r--r-- | lisp/timezone.el | 6 |
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. | |||
| 291 | If TIMEZONE is nil, use the local time zone." | 291 | If TIMEZONE is nil, use the local time zone." |
| 292 | (let* ((date (timezone-parse-date date)) | 292 | (let* ((date (timezone-parse-date date)) |
| 293 | (year (string-to-int (aref date 0))) | 293 | (year (string-to-int (aref date 0))) |
| 294 | (year (if (< year 100) (+ year 1900) year)) | 294 | (year (cond ((< year 50) |
| 295 | (+ year 2000)) | ||
| 296 | ((< year 100) | ||
| 297 | (+ year 1900)) | ||
| 298 | (t year))) | ||
| 295 | (month (string-to-int (aref date 1))) | 299 | (month (string-to-int (aref date 1))) |
| 296 | (day (string-to-int (aref date 2))) | 300 | (day (string-to-int (aref date 2))) |
| 297 | (time (timezone-parse-time (aref date 3))) | 301 | (time (timezone-parse-time (aref date 3))) |