django-tz-detect icon indicating copy to clipboard operation
django-tz-detect copied to clipboard

Wrong TZ detected for sessions that cross DST change

Open ktosiek opened this issue 5 years ago • 1 comments

As the TZ guessing is only based on offset, and the guessed TZ is never saved, the same offset will be used after the user moved into daylight saving. This causes existing sessions to change current timezone.

ktosiek avatar Apr 06 '20 14:04 ktosiek

I noticed the same behavior. I'm in PST so

"offset=" + (new Date).getTimezoneOffset()
"offset=480"

My server backend is in UTC. DST at PST doesn't occur until 2AM tomorrow but since the server backend timezone crossed over. I'm getting the timezone listed as AKST on my app.

K-MTG avatar Mar 14 '21 06:03 K-MTG