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 15:05:06 +0100 Message-ID: <87ip2sp7u5.fsf@ucl.ac.uk> References: <87vc6vxf06.fsf@thinkpad.tsdh.de> <874ned6fhj.fsf@ucl.ac.uk> <87a9o41ns3.fsf@ucl.ac.uk> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([208.118.235.92]:56864) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaRTG-0007iA-HH for emacs-orgmode@gnu.org; Thu, 09 May 2013 10:05:25 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UaRTC-0000Gi-PG for emacs-orgmode@gnu.org; Thu, 09 May 2013 10:05:22 -0400 Received: from tx2ehsobe004.messaging.microsoft.com ([65.55.88.14]:35625 helo=tx2outboundpool.messaging.microsoft.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UaRTC-0000FR-IG for emacs-orgmode@gnu.org; Thu, 09 May 2013 10:05:18 -0400 In-Reply-To: (Guido Van Hoecke's message of "Thu, 9 May 2013 15:24:15 +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: > Eric, > > Eric S Fraga writes: [...] >> Suggestions on how to handle this case would be welcome, of course. > > I created a patch so that the date and time string is built directly > from the iCal data for times before the epoch. This function produces > valid date/time strings albeit without weekday info. > > Patch file is attached. Excellent. Thanks for this. Can you update the file on Worg directly? If not, I will try to do it. One point, however. Should the first return statement in your datetimestring(input) function (see last line in patch excerpt below) refer to "input" instead of "datetmp"? What you have works because of all variables being global but is less clear than using the argument, I would suggest? > +function datetimestring(input) > +{ > + # try to create datetimestring from the datetimestamp > + timestamp = datetimestamp(input); > + if (timestamp > 0) > + return strftime("%Y-%m-%d %a %H:%M", datetimestamp(datetmp)); Thanks again, eric -- : Eric S Fraga, GnuPG: 0xC89193D8FFFCF67D : in Emacs 24.3.50.1 and Org release_8.0.2-101-gce5988