-
-
Notifications
You must be signed in to change notification settings - Fork 28
Open
Labels
enhancementNew feature or requestNew feature or request
Description
The revelant HTML file : htmldate_debug_no_timezone.html.zip
Thanks for all your hard work! htmldate
is very useful for me.
But when I use htmldate
, I found ther is no timezone in the result.
I try the code :
from htmldate import find_date
from pathlib import Path
content = Path(input_path).read_text(encoding='utf-8')
from lxml import html
mytree = html.fromstring(content)
publish_time = find_date(mytree, outputformat="%Y-%m-%d %H:%M:%S%z")
HTML be like :
"datePublished": "2024-11-06T08:37:00+05:30",
Result I expected :
2024-11-06T08:37:00+05:30
the result from htmldate :
2024-11-06 00:00:00
There is no timezone, please help check this problem.
I will be very glad to fix this problem with you.
adbar
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request