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
23
forks
source link
Fixed DST problem for dates with time zone indicator #22
Problem: when date with time zone indicator is parsed by
DateBuilder.parseDate(String) the local DST (Daylight saving time)
affects the parsed result by DST offset of local JVM.
The expected behaviour is: when parsed date has a time zone indication
then the parsed date must respect only time zone offset of parsed date. The
TimeZone of locale JVM must not affect the parsed result.
(DateBuilder.java)
remove local related computation if time zone indication is present in
parsed date
(DateParserTest.java)
add test case for dates with/without time zone indicator. The date is
parsed in any available time zone. Note: without fix in
DateBuilder.java the test fails for date with time zone information
P.S.
It is expected that this fix solves the issue #8(Strange timezone offsets)
Problem: when date with time zone indicator is parsed by DateBuilder.parseDate(String) the local DST (Daylight saving time) affects the parsed result by DST offset of local JVM. The expected behaviour is: when parsed date has a time zone indication then the parsed date must respect only time zone offset of parsed date. The TimeZone of locale JVM must not affect the parsed result.
(DateBuilder.java)
(DateParserTest.java)
P.S. It is expected that this fix solves the issue #8(Strange timezone offsets)