sisyphsu / dateparser

dateparser is a smart and high-performance date parser library, it supports hundreds of different formats, nearly all format that we may used. And this is also a showcase for "retree" algorithm.
MIT License
95 stars 24 forks source link

Parsing a date with some negative offsets raises an exception. #19

Closed andriy-samson closed 3 years ago

andriy-samson commented 3 years ago

Steps to reproduce: Try to parse a date with negative time zone offset and minutes set in 30 - “2020-12-31 01:33-09:30” and “2020-12-31 07:33-03:30”. Error is raised: Zone offset minutes and seconds must be negative because hours is negative..” Please, note: parsing works for most of time zones (negative and positive). The problem happened only when negative time zone has non-zero minutes.

UTC-09:30 and UTC-03:30 are real offsets: https://en.wikipedia.org/wiki/List_of_UTC_time_offsets

andriy-samson commented 3 years ago

Thanks @sisyphsu