timezone Datatype in django – Education Career Blog

 class MyModel(models.Model): 
    timezone = models.CharField() 

In the above,should timezone be stored in a char field for the below values,

   from pytz import all_timezones

   for t in all_timezones:
       print t

    Africa/Abidjan
    Africa/Accra
    ----
    ----   

,

Unless the name actually matters, I’d just store it as an offset in minutes or seconds from UTC.

Leave a Comment