diff options
Diffstat (limited to 'mastodon')
-rw-r--r-- | mastodon/Mastodon.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/mastodon/Mastodon.py b/mastodon/Mastodon.py index 44e3b52..493d485 100644 --- a/mastodon/Mastodon.py +++ b/mastodon/Mastodon.py | |||
@@ -519,7 +519,7 @@ class Mastodon: | |||
519 | return datetime.datetime.fromtimestamp(epoch_time) | 519 | return datetime.datetime.fromtimestamp(epoch_time) |
520 | else: | 520 | else: |
521 | raise MastodonAPIError("No server time in response.") | 521 | raise MastodonAPIError("No server time in response.") |
522 | 522 | ||
523 | @staticmethod | 523 | @staticmethod |
524 | def get_supported_version(): | 524 | def get_supported_version(): |
525 | """ | 525 | """ |
@@ -3409,8 +3409,7 @@ class Mastodon: | |||
3409 | if v != None: | 3409 | if v != None: |
3410 | try: | 3410 | try: |
3411 | if isinstance(v, int): | 3411 | if isinstance(v, int): |
3412 | json_object[k] = datetime.datetime.fromtimestamp( | 3412 | json_object[k] = datetime.datetime.fromtimestamp(v, pytz.utc) |
3413 | v, pytz.utc) | ||
3414 | else: | 3413 | else: |
3415 | json_object[k] = dateutil.parser.parse(v) | 3414 | json_object[k] = dateutil.parser.parse(v) |
3416 | except: | 3415 | except: |