I have the below settings:
TIME_ZONE = UTC
USE_TZ = True
My server timezone is UTC+1
and the end user's timezone is UTC+2
. Should I care about the server timezone or it is not related at all?
I have the below settings:
TIME_ZONE = UTC
USE_TZ = True
My server timezone is UTC+1
and the end user's timezone is UTC+2
. Should I care about the server timezone or it is not related at all?
Server time zone isn't related in most cases. Your application will use UTC. The most common application in python uses datetime.datetime.now(tzInfo=None)
which will automatically pass tzInfo
as None when you call datetime.datetime.now()
. Unless you specify what timezone tzInfo
is, the datetime object will always return UTC.