Skip to content

Commit

Permalink
tries fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
WolfgangFahl committed Jul 27, 2024
1 parent 52caf1a commit ec1ec7e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions wikibot3rd/smw.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,10 @@ def deserializeSingle(self, value):
if "timestamp" in value:
ts = int(value["timestamp"])
try:
# timezone aware
value = datetime.fromtimestamp(ts, tz=timezone.utc)
# naive - for compatibility
value = value.replace(tzinfo=None)
# print (date.strftime('%Y-%m-%d %H:%M:%S'))
except ValueError as ve:
if self.debug:
Expand Down

0 comments on commit ec1ec7e

Please sign in to comment.