mirror of
https://github.com/wassname/psaw.git
synced 2026-09-24 13:51:02 +08:00
Fixed utc offset bug for issue #8
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user