From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric S Fraga Subject: Re: Problem with Google Calendar Synchronization Date: Thu, 9 May 2013 10:54:36 +0100 Message-ID: <87a9o41ns3.fsf@ucl.ac.uk> References: <87vc6vxf06.fsf@thinkpad.tsdh.de> <874ned6fhj.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:52781) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaNZE-00068G-ET for emacs-orgmode@gnu.org; Thu, 09 May 2013 05:55:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UaNZB-0005cP-K8 for emacs-orgmode@gnu.org; Thu, 09 May 2013 05:55:16 -0400 Received: from va3ehsobe001.messaging.microsoft.com ([216.32.180.11]:47920 helo=va3outboundpool.messaging.microsoft.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaNZB-0005ah-GC for emacs-orgmode@gnu.org; Thu, 09 May 2013 05:55:13 -0400 In-Reply-To: (Guido Van Hoecke's message of "Wed, 8 May 2013 17:45:43 +0200") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Guido Van Hoecke Cc: orgmode Guido Van Hoecke writes: [...] > My ics file had a.o. my elder sister's birthday, and unfortunately her's > as well as mine is (way) before the start of the epoch, so mktime > returns a negative timestamp at line 63 and strftime at line 143 doesn't > grok it. Ah, I see. The script should at least not break just because some of us (me included) are older than Unix... ;-) The fix should be straightforward. Could you try adding the lines if (timestamp < 0) timestamp = 0; after the call to mktime in the datetimestamp function? This should at least make the script not crap out although obviously the date will be wrong (set to start of epoch). If this works, I will update the script on Worg and put in a warning message of some sort, maybe even in the entry itself. Suggestions on how to handle this case would be welcome, of course. -- : Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D : in Emacs 24.3.50.1 and Org release_8.0.2-68-g40635b