pombreda / gcalcli

Automatically exported from code.google.com/p/gcalcli
0 stars 0 forks source link

timestamp out of range error #23

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When I do:
gcalcli search <some-string>

I sometimes get this error:
Traceback (most recent call last):
  File "/usr/bin/gcalcli", line 1114, in ?
    DoooooItHippieMonster()
  File "/usr/bin/gcalcli", line 1036, in DoooooItHippieMonster
    gcal.TextQuery(uniArg)
  File "/usr/bin/gcalcli", line 749, in TextQuery
    eventList = self._SearchForCalEvents(None, None, self.now, searchText)
  File "/usr/bin/gcalcli", line 714, in _SearchForCalEvents
    eventList.sort(lambda x, y:
  File "/usr/bin/gcalcli", line 716, in <lambda>
    default=defaultDateTime).astimezone(tzlocal()),
  File "/var/lib/python-support/python2.4/dateutil/tz.py", line 92, in
utcoffset
    if self._isdst(dt):
  File "/var/lib/python-support/python2.4/dateutil/tz.py", line 135, in _isdst
    return time.localtime(timestamp+time.timezone).tm_isdst
ValueError: timestamp out of range for platform time_t

It seems to happen for periodic events - in this case I tried searching for
birthdays, which I entered as yearly events with no end date. Might that be the
problem?

I am using the Debian package, version 1.4-1.

Greetings,
Frank

Original issue reported on code.google.com by f...@intoxicatedmind.net on 22 Feb 2008 at 1:13

GoogleCodeExporter commented 9 years ago

Original comment by eda...@insanum.com on 24 Jul 2011 at 1:57

GoogleCodeExporter commented 9 years ago
Fixed.  This problem was due to events that start or end beyond year 2038.  The 
dateutil module chokes on these dates and can't parse them to a native system 
time as the variable space is implementation dependent.  Workaround I made is 
to simply dump any events that flirt with 2038.

Original comment by eda...@insanum.com on 24 Jul 2011 at 5:44

GoogleCodeExporter commented 9 years ago

Original comment by eda...@insanum.com on 27 Jul 2011 at 4:59