Closed gutsytechster closed 1 year ago
I have run the minimum working example from the original report, and the output is the same before and after this change.
The test cases would fail on the master branch. Also, for me, the changes result in the correct output.
In [1]: import dateparser
...: import datetime
...:
...: working_settings={
...: 'PREFER_DATES_FROM': 'future',
...: 'TO_TIMEZONE': 'etc/utc',
...: 'RETURN_AS_TIMEZONE_AWARE': False,
...: 'RELATIVE_BASE': datetime.datetime(2022, 11, 6, 22, 0)
...: }
...:
...: broken_settings = working_settings
...: broken_settings['TIMEZONE'] = 'america/new_york'
...:
...: correct_time = dateparser.parse('6pm EST', settings=working_settings)
...: print(correct_time) # 2022-11-06 23:00:00
...:
...: wrong_time = dateparser.parse('6pm', settings=broken_settings)
...: print(wrong_time) # 2022-11-07 23:00:00
2022-11-06 23:00:00
2022-11-06 23:00:00
You are right, I am getting the expected output with the fix now. I have no idea what I did wrong before, I must have installed the wrong branch :sweat_smile:
Today I Learn pip install git+…
does not actually overwrite the installed package if they both have the same version in setup.py
:sweat:
This fixes #1092