Django ORM: time zone support

Can you recommend any implementation of time zone support for Django ORM (DateTime filed)?

Ideally, this should be DB-agnostic and transparent, allowing you to use all the standard ORM stuff like __lt, __gt, etc.

I think he needs to store the time in UTC plus the local time zone.

Thanks!

+3
source share
3 answers

UTCDateTime seems to satisfy most requirements.

+1
source

, django-timezones. # 8953 django. , Onion .

+2

I do not know a pre-prepared implementation that you can use, but this post discusses how to implement the Django date field, which maps to multiple database columns.

+1
source

Source: https://habr.com/ru/post/1713917/


All Articles