From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kostas Zorbadelos Newsgroups: gmane.emacs.help Subject: Re: gnus-icalendar errors in emacs 24.5 [timezone issue] Date: Tue, 23 Feb 2016 16:25:36 +0200 Organization: OTE SA Message-ID: <87oab7zeov.fsf_-_@otenet.gr> References: <87y4acurrt.fsf@gnus.org> <871t83bup9.fsf@xing.com> <87a8mru3yc.fsf@gnus.org> <87h9gz90jb.fsf_-_@otenet.gr> Reply-To: kzorba@otenet.gr NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1456237738 27479 80.91.229.3 (23 Feb 2016 14:28:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Feb 2016 14:28:58 +0000 (UTC) Cc: Lars Ingebrigtsen , help-gnu-emacs@gnu.org To: Jan Tatarik Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Feb 23 15:28:50 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1aYDxI-000644-KH for geh-help-gnu-emacs@m.gmane.org; Tue, 23 Feb 2016 15:28:48 +0100 Original-Received: from localhost ([::1]:57512 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYDxH-0005p8-Se for geh-help-gnu-emacs@m.gmane.org; Tue, 23 Feb 2016 09:28:47 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60745) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYDuL-0000jF-35 for help-gnu-emacs@gnu.org; Tue, 23 Feb 2016 09:25:48 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aYDuG-0001vi-Se for help-gnu-emacs@gnu.org; Tue, 23 Feb 2016 09:25:44 -0500 Original-Received: from calypso.otenet.gr ([83.235.67.36]:54238) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aYDuG-0001vD-Lz for help-gnu-emacs@gnu.org; Tue, 23 Feb 2016 09:25:40 -0500 Original-Received: from otenet.gr (athe-ppp-008.otenet.gr [195.167.126.249]) by calypso.otenet.gr (ESMTP) with ESMTPSA id 56A8A138040; Tue, 23 Feb 2016 16:25:37 +0200 (EET) In-Reply-To: <87h9gz90jb.fsf_-_@otenet.gr> (Kostas Zorbadelos's message of "Tue, 23 Feb 2016 12:35:52 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 83.235.67.36 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:109272 Archived-At: Kostas Zorbadelos writes: Hello, time handling is never trivial, it seems. When the calendar sender is in a different timezone, the extracted event does not seem to be converted to my timezone. I need more reading and understanding of the code to find out where the issue is (e.g what exactly are start, end below in (defmethod gnus-icalendar-event:org-timestamp ((event gnus-icalendar-event)) ... (start (gnus-icalendar-event:start-time event)) (end (gnus-icalendar-event:end-time event)) ... ). In case you have any ideas, or I am missing something, please share. Regards, Kostas > Lars Ingebrigtsen writes: > >> Jan Tatarik writes: >> >>> How about this? It's a patch against the emacs-25 branch, I was not able >>> to connect to the gnus git. >> >> The Gnus git repository is now read-only (and only with anonymous >> access). >> >>> 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))) >> >> Yes, this seems to fix the problem. I'll apply to emacs-25 and push. > -- Kostas Zorbadelos http://gr.linkedin.com/in/kzorba