K
K
Kopta2019-09-02 21:59:53
Django
Kopta, 2019-09-02 21:59:53

Why is Django displaying times as MSK+3 and not UTC+3?

In settings.py :

LANGUAGE_CODE = 'en-us'
TIME_ZONE = 'Europe/Moscow'
USE_I18N = True
USE_L10N = True
USE_TZ = True

In the console I execute ./manage.py shell and there:
from django.utils import timezone
timezone.localtime(timezone.now())

to which I get the output:
datetime.datetime(2019, 9, 2, 21, 37, 4, 511034, tzinfo=<DstTzInfo 'Europe/Moscow' MSK+3:00:00 STD>)

Why does it write MSK+3 at the end if it's UTC+3? Or I don't understand something.
Thank you!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dpws, 2019-09-02
@dpws

Perhaps +3:00:00 is the MSK offset from UTC, not Moscow time +3 hours. =)
Judging by the time, 21:37:04 - so it is.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question