From 841eef6f94da17a4d9512090829abd5d4665f87d Mon Sep 17 00:00:00 2001 From: Allan Galarza Date: Wed, 12 May 2021 13:33:44 -0700 Subject: [PATCH] Fixed house transfer date not being parsed properly. --- CHANGELOG.rst | 7 +++++++ tibiapy/__init__.py | 2 +- tibiapy/utils.py | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 103b5eb5..258d9d0f 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -6,6 +6,13 @@ Changelog Due to this library relying on external content, older versions are not guaranteed to work. Try to always use the latest version. +.. v4.1.3 + +4.1.3 (2021-05-12) +================== +- Fixed house transfer date not being parsed properly. + + .. v4.1.2 4.1.2 (2021-04-27) diff --git a/tibiapy/__init__.py b/tibiapy/__init__.py index 92b98bb8..8355954a 100644 --- a/tibiapy/__init__.py +++ b/tibiapy/__init__.py @@ -1,4 +1,4 @@ -__version__ = '4.1.2' +__version__ = '4.1.3' __author__ = 'Allan Galarza' import logging diff --git a/tibiapy/utils.py b/tibiapy/utils.py index 173dbe68..40a71b76 100644 --- a/tibiapy/utils.py +++ b/tibiapy/utils.py @@ -118,7 +118,7 @@ def parse_tibia_datetime(datetime_str) -> Optional[datetime.datetime]: The represented datetime, in UTC (timezone aware). """ try: - datetime_str = datetime_str.replace(",", "").replace(" ", " ") + datetime_str = datetime_str.replace(",", "").replace(" ", " ").strip() # Extracting timezone tz = datetime_str[-4:].strip()