diff options
| author | Ulf Jasper | 2009-12-18 19:35:14 +0000 |
|---|---|---|
| committer | Ulf Jasper | 2009-12-18 19:35:14 +0000 |
| commit | 6fe539d246f75dbba74b95a5ace37ea8ce91e3dd (patch) | |
| tree | 1d20a43661890f4c771748b88e7e47bcb4f5f5a8 /lisp | |
| parent | 83828b06e39f2d3586fbca04b4f3335a442a2f9b (diff) | |
| download | emacs-6fe539d246f75dbba74b95a5ace37ea8ce91e3dd.tar.gz emacs-6fe539d246f75dbba74b95a5ace37ea8ce91e3dd.zip | |
Fixed timezone handling problem in icalendar.el.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 8 | ||||
| -rw-r--r-- | lisp/calendar/icalendar.el | 12 |
2 files changed, 19 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f3cff6c8137..193aa942fe1 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2009-12-18 Ulf Jasper <ulf.jasper@web.de> | ||
| 2 | |||
| 3 | * calendar/icalendar.el (icalendar--convert-tz-offset): Fixed | ||
| 4 | timezone names. | ||
| 5 | (icalendar--convert-tz-offset): Fixed the "last-day-problem". | ||
| 6 | (icalendar--add-diary-entry): Remove the trailing blank that | ||
| 7 | diary-make-entry inserts. | ||
| 8 | |||
| 1 | 2009-12-17 Michael Albinus <michael.albinus@gmx.de> | 9 | 2009-12-17 Michael Albinus <michael.albinus@gmx.de> |
| 2 | 10 | ||
| 3 | Make `file-expand-wildcards' work for remote files. | 11 | Make `file-expand-wildcards' work for remote files. |
diff --git a/lisp/calendar/icalendar.el b/lisp/calendar/icalendar.el index 0bf4c08a122..2dade482858 100644 --- a/lisp/calendar/icalendar.el +++ b/lisp/calendar/icalendar.el | |||
| @@ -454,7 +454,7 @@ The strings are suitable for assembling into a TZ variable." | |||
| 454 | (cons | 454 | (cons |
| 455 | (concat | 455 | (concat |
| 456 | ;; Fake a name. | 456 | ;; Fake a name. |
| 457 | (if dst-p "(DST?)" "(STD?)") | 457 | (if dst-p "DST" "STD") |
| 458 | ;; For TZ, OFFSET is added to the local time. So, | 458 | ;; For TZ, OFFSET is added to the local time. So, |
| 459 | ;; invert the values. | 459 | ;; invert the values. |
| 460 | (if (eq (aref offset 0) ?-) "+" "-") | 460 | (if (eq (aref offset 0) ?-) "+" "-") |
| @@ -466,6 +466,10 @@ The strings are suitable for assembling into a TZ variable." | |||
| 466 | (week (if (eq day -1) | 466 | (week (if (eq day -1) |
| 467 | byday | 467 | byday |
| 468 | (substring byday 0 -2)))) | 468 | (substring byday 0 -2)))) |
| 469 | ;; "Translate" the icalendar way to specify the last | ||
| 470 | ;; (sun|mon|...)day in month to the tzset way. | ||
| 471 | (if (string= week "-1") ; last day as icalendar calls it | ||
| 472 | (setq week "5")) ; last day as tzset calls it | ||
| 469 | (concat "M" bymonth "." week "." (if (eq day -1) "0" | 473 | (concat "M" bymonth "." week "." (if (eq day -1) "0" |
| 470 | (int-to-string day)) | 474 | (int-to-string day)) |
| 471 | ;; Start time. | 475 | ;; Start time. |
| @@ -2241,6 +2245,12 @@ the entry." | |||
| 2241 | 'diary-make-entry | 2245 | 'diary-make-entry |
| 2242 | 'make-diary-entry) | 2246 | 'make-diary-entry) |
| 2243 | string non-marking diary-file))) | 2247 | string non-marking diary-file))) |
| 2248 | ;; Würgaround to remove the trailing blank char | ||
| 2249 | (save-excursion | ||
| 2250 | (set-buffer (find-file diary-file)) | ||
| 2251 | (goto-char (point-max)) | ||
| 2252 | (if (= (char-before) ? ) | ||
| 2253 | (delete-char -1))) | ||
| 2244 | ;; return diary-file in case it has been changed interactively | 2254 | ;; return diary-file in case it has been changed interactively |
| 2245 | diary-file) | 2255 | diary-file) |
| 2246 | 2256 | ||