How to set the timezone in Django?

后端 未结 8 889
萌比男神i
萌比男神i 2020-11-29 19:33

In my django project\'s settings.py file, I have this line :

TIME_ZONE = \'UTC\'

But I want my app to run in UTC+2 timezone, s

8条回答
  •  挽巷
    挽巷 (楼主)
    2020-11-29 20:19

    I found this question looking to change the timezone in my Django project's settings.py file to the United Kingdom.

    Using the tz database in jfs' solution I found the answer:

        TIME_ZONE = 'Europe/London'
    

提交回复
热议问题