mirror of
https://github.com/secynic/ipwhois.git
synced 2025-12-10 00:40:57 -06:00
Fixed NIR datetime parsing issue if only date is returned (#284)
This commit is contained in:
parent
d324428222
commit
50df6efb96
@ -21,6 +21,7 @@ Changelog
|
||||
- Fixed deprecation warnings due to invalid escape sequences
|
||||
(#272 - tirkarthi)
|
||||
- Fixed bug in root and sub-entities not getting queried/data (#247)
|
||||
- Fixed NIR datetime parsing issue if only date is returned (#284)
|
||||
- Added new argument root_ent_check to IPWhois.lookup_rdap and
|
||||
RDAP.lookup. Set this to False to revert to old functionality - missing data,
|
||||
but less queries (#247)
|
||||
|
||||
@ -265,12 +265,20 @@ class NIRWhois:
|
||||
|
||||
if field in ['created', 'updated'] and dt_format:
|
||||
|
||||
value = (
|
||||
datetime.strptime(
|
||||
values[0],
|
||||
str(dt_format)
|
||||
) - timedelta(hours=hourdelta)
|
||||
).isoformat('T')
|
||||
try:
|
||||
value = (
|
||||
datetime.strptime(
|
||||
values[0],
|
||||
str(dt_format)
|
||||
) - timedelta(hours=hourdelta)
|
||||
).isoformat('T')
|
||||
except ValueError:
|
||||
value = (
|
||||
datetime.strptime(
|
||||
values[0],
|
||||
'%Y/%m/%d'
|
||||
)
|
||||
).isoformat('T')
|
||||
|
||||
elif field in ['nameservers']:
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user