dateparse icon indicating copy to clipboard operation
dateparse copied to clipboard

ParseLocal creates inconsistencies with daylight saving when passing an UTC offset

Open drf opened this issue 6 years ago • 0 comments

Consider the following:

sinceTime, err = dateparse.ParseLocal(since)

Currently, EU and US are in different daylight saving settings.

Running that code in US and EU over this timeframe, bears two different results. The parsed date is equivalent when giving

"2019-10-21 23:56:20 -0700 UTC" in EU "2019-10-21 23:56:20 -0600 UTC" in US

Which apparently means that daylight saving is taken into account somehow, even if a UTC offset is given.

Ideally, when giving UTC offsets, the standard UTC timing should be kept, even when dealing with ParseLocal

drf avatar Oct 23 '19 10:10 drf