Permalink
Browse files

timezone support

  • Loading branch information...
1 parent 0172cfa commit 1e317a337a1dc870a6c84d14a904870d0b64e4ca @vintitres committed May 2, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 gnome-shell-google-calendar.py
@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
import sys
import getopt
+import time as ptime
from datetime import datetime, timedelta
from getpass import getpass
from threading import Thread
@@ -280,7 +281,8 @@ def parse_time(self, timestr):
allday = True
except ValueError:
time = iso8601.parse_date(timestr)
- time = time.timetuple()[:-1] + (-1,) # Discard tm_isdst
+ time = ptime.localtime(calendar.timegm(
+ time.utctimetuple()[:-1] + (-1,)))
allday = False
timestamp = int(mktime(time))

0 comments on commit 1e317a3

Please sign in to comment.