Skip to content

Commit

Permalink
Fix datetime parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
whoisxmlapi committed Jul 31, 2023
1 parent 584335d commit 0b65457
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@
Changelog
=========

1.2.0 (2023-07-31)
------------------

* Fix datetime parsing

1.1.4 (2023-07-31)
------------------

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def read(*names, **kwargs):

setup(
name='whois-api',
version='1.1.4',
version='1.2.0',
python_requires='~=3.7',
license='MIT',
description='Python client library for Whois API.',
Expand Down
2 changes: 1 addition & 1 deletion src/whoisapi/models/response.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def _datetime_value(values: dict, key: str) -> datetime.datetime or None:
try:
if m is not None:
return datetime.datetime.strptime(
re_milliseconds_and_timezone_offset.sub(r'\1\2\3\5'),
re_milliseconds_and_timezone_offset.sub(r'\2\3\5', dt),
"%Y-%m-%dT%H:%M:%S%z")
if m2 is not None:
return datetime.datetime.strptime(
Expand Down

0 comments on commit 0b65457

Please sign in to comment.