Fixed utc offset bug for issue #8

This commit is contained in:
David Marx
2018-04-21 13:01:53 -07:00
parent bdfaccc51b
commit c48269d7e7
+4 -1
View File
@@ -30,7 +30,10 @@ class PushshiftAPIMinimal(object):
@property
def utc_offset_secs(self):
if not self._utc_offset_secs:
self._utc_offset_secs = dt.utcnow().astimezone().utcoffset().total_seconds()
try:
self._utc_offset_secs = dt.utcnow().astimezone().utcoffset().total_seconds()
except ValueError:
self._utc_offset_secs = 0
return self._utc_offset_secs
def _limited(self, payload):