I have a question regarding the package django.utils.timezone.
I am in the UTC + 7 time zone. Thus, if it is 16:00 local time, it
timezone.now()returns 9:00. This is normal.
However, when I do the following:
current_tz = pytz.timezone('Europe/Moscow')
timezone.activate(current_tz)
I expect to be timezone.now()back at 12:00 at 16:00 local time, but the exit will remain the same at 9:00.
Does timezone.activate () affect anything at all?
Daria source
share