Django wrong environ TZ variable

59 Views Asked by At

i notice an issue, that environ.get('TZ') in django is different than system env TZ. In django it is always "America/Chicago", but if i try printenv TZ directly on server, or use

python
import os
environ.get('TZ')

it is different, correct, my env TZ that I expect to see in django. In django print all envs are same as system, except TZ. I misunderstand this =\

1

There are 1 best solutions below

0
iklinac On

Django does take in account TIME_ZONE env for default time zone (timezone docs ) variable which defaults to 'America/Chicago' as documented ( in new templates to UTC )