Skip to content

search_dates() wrong result for 12:xx am #894

@jfbauer432

Description

@jfbauer432

search_dates() gives wrong results for times between 12:00 am and 12:59 am (hour is off by 12), but parse() is correct.

>>> import dateparser
>>> from dateparser.search import search_dates 
>>> dateparser.__version__
'1.0.0'
>>> 
>>> search_dates('March 3, 2021, 12:47 am')
[('March 3, 2021, 12:47 am', datetime.datetime(2021, 3, 3, 12, 47))]
>>>
>>> dateparser.parse('March 3, 2021, 12:47 am')
datetime.datetime(2021, 3, 3, 0, 47)

Python version is 3.8.9, OS is Ubuntu 20.10

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions