diff options
| author | Richard M. Stallman | 1995-07-07 13:25:47 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-07-07 13:25:47 +0000 |
| commit | f457383941d94c22eca32d89a0b7934c09ee13d3 (patch) | |
| tree | fcaa4b2df41a167ec5f979c91e3b8b12cba9506d | |
| parent | e11a39dfe9deef46bc4fe3fc8103dd27a3dbf1e4 (diff) | |
| download | emacs-f457383941d94c22eca32d89a0b7934c09ee13d3.tar.gz emacs-f457383941d94c22eca32d89a0b7934c09ee13d3.zip | |
(timezone-parse-date): Ignore text properties.
| -rw-r--r-- | lisp/timezone.el | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/lisp/timezone.el b/lisp/timezone.el index 5e0fd7f105b..58d9faa6639 100644 --- a/lisp/timezone.el +++ b/lisp/timezone.el | |||
| @@ -130,6 +130,12 @@ Understands the following styles: | |||
| 130 | (5) 22-AUG-1993 10:59:12.82 | 130 | (5) 22-AUG-1993 10:59:12.82 |
| 131 | (6) Thu, 11 Apr 16:17:12 91 [MET] | 131 | (6) Thu, 11 Apr 16:17:12 91 [MET] |
| 132 | (7) Mon, 6 Jul 16:47:20 T 1992 [MET]" | 132 | (7) Mon, 6 Jul 16:47:20 T 1992 [MET]" |
| 133 | ;; Get rid of any text properties. | ||
| 134 | (and (stringp date) | ||
| 135 | (or (text-properties-at 0 date) | ||
| 136 | (next-property-change 0 date)) | ||
| 137 | (setq date (copy-sequence date)) | ||
| 138 | (set-text-properties 0 (length date) nil date)) | ||
| 133 | (let ((date (or date "")) | 139 | (let ((date (or date "")) |
| 134 | (year nil) | 140 | (year nil) |
| 135 | (month nil) | 141 | (month nil) |
| @@ -176,17 +182,13 @@ Understands the following styles: | |||
| 176 | ;; It is now Dec 1992. 8 years before the end of the World. | 182 | ;; It is now Dec 1992. 8 years before the end of the World. |
| 177 | (if (< (length year) 4) | 183 | (if (< (length year) 4) |
| 178 | (setq year (concat "19" (substring year -2 nil)))) | 184 | (setq year (concat "19" (substring year -2 nil)))) |
| 179 | (setq month | 185 | (let ((string (substring date |
| 180 | (int-to-string | 186 | (match-beginning month) |
| 181 | (cdr | 187 | (+ (match-beginning month) 3)))) |
| 182 | (assoc | 188 | (setq month |
| 183 | (upcase | 189 | (int-to-string |
| 184 | ;; Don't use `match-end' in order to take 3 | 190 | (cdr (assoc (upcase string) timezone-months-assoc))))) |
| 185 | ;; letters from the beginning. | 191 | |
| 186 | (substring date | ||
| 187 | (match-beginning month) | ||
| 188 | (+ (match-beginning month) 3))) | ||
| 189 | timezone-months-assoc)))) | ||
| 190 | (setq day | 192 | (setq day |
| 191 | (substring date (match-beginning day) (match-end day))) | 193 | (substring date (match-beginning day) (match-end day))) |
| 192 | (setq time | 194 | (setq time |