scrapinghub / dateparser

python parser for human readable dates
BSD 3-Clause "New" or "Revised" License
2.55k stars 465 forks source link

Parsing date with ist or Bdst returns Israeli time zone #580

Open manycoding opened 4 years ago

manycoding commented 4 years ago

dateparser 0.7.2 How to reproduce

str(parse("February 03, 2018 07:18 IST"))
>>>'2018-02-03 07:18:00+02:00'

parse("February 03, 2018 07:18 IST").tzinfo
>>><StaticTzInfo 'IST'>

Expected: Indian Standard Time, +05:30 Same for 16 Feb 2018 09:59 AM BdST

I saw the comment on the top https://github.com/scrapinghub/dateparser/blob/a01d0d1d6278e05b292cb818e44586008c64db12/dateparser/timezones.py And in all the links the first value for IST is Indian Standard Time. I haven't debugged it yet to understand why we have Israeli time.

How do we parse conflicting values anyway? I assume if there are multiple values for tz we return the first.

Octopus67 commented 4 years ago

I would love to work on this issue

noviluni commented 4 years ago

I just opened an issue to discuss this: https://github.com/scrapinghub/dateparser/issues/683

If you have any feedback, please, don't hesitate to write it there, it will be really appreciated. :raised_hands: