django-clickhouse-backend icon indicating copy to clipboard operation
django-clickhouse-backend copied to clipboard

[Issue]

Open PavelIgin opened this issue 1 year ago • 1 comments

How i can add timezone to DateTime64Field ???

PavelIgin avatar Apr 03 '24 08:04 PavelIgin

Just set USE_TZ = True in settings.py, which is the default. Then time will have UTC timezone when retrieved from database. You can change time to local timezone with django timezone utils.

from django.utils import timezone

timezone.localtime(time)

jayvynl avatar Apr 03 '24 08:04 jayvynl