[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gnus-icalendar errors in emacs 24.5
From: |
Jan Tatarik |
Subject: |
Re: gnus-icalendar errors in emacs 24.5 |
Date: |
Tue, 23 Feb 2016 11:13:38 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.90 (gnu/linux) |
On Tue, Feb 23 2016, Lars Magne Ingebrigtsen wrote:
[...]
> This is definitely a bug, and it comes from here:
> (cl-defmethod gnus-icalendar-event:org-timestamp ((event
> gnus-icalendar-event))
> "Build `org-mode' timestamp from EVENT start/end dates and recurrence info."
> (let* ((start (gnus-icalendar-event:start-time event))
> (end (gnus-icalendar-event:end-time event))
> (start-date (format-time-string "%Y-%m-%d %a" start))
> %a is the locale's day name, and that's not something `date-to-time' can
> parse. But I'm not familiar with gnus-icalendar, so I'm not sure what
> the right fix is here.
> Jan, is the week day supposed to be in these date strings at all?
How about this? It's a patch against the emacs-25 branch, I was not able
to connect to the gnus git.
diff --git a/lisp/gnus/gnus-icalendar.el b/lisp/gnus/gnus-icalendar.el
index 4faef06..82a649f 100644
--- a/lisp/gnus/gnus-icalendar.el
+++ b/lisp/gnus/gnus-icalendar.el
@@ -401,8 +401,8 @@ gnus-icalendar-event:org-timestamp
(end-time (format-time-string "%H:%M" end))
(end-at-midnight (string= end-time "00:00"))
(start-end-date-diff (/ (float-time (time-subtract
- (date-to-time end-date)
- (date-to-time start-date)))
+ (org-time-string-to-time end-date)
+ (org-time-string-to-time start-date)))
86400))
(org-repeat (gnus-icalendar-event:org-repeat event))
(repeat (if org-repeat (concat " " org-repeat) ""))