Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

timezone support

  • Loading branch information...
commit 1e317a337a1dc870a6c84d14a904870d0b64e4ca 1 parent 0172cfa
@vintitres authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 gnome-shell-google-calendar.py
View
4 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))
Please sign in to comment.
Something went wrong with that request. Please try again.