pythonpython-3.xdjangotimezoneutc

How to set the timezone in Django


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, so I changed it to

TIME_ZONE = 'UTC+2'

It gives the error ValueError: Incorrect timezone setting: UTC+2. What is the correct way of doing this?

Thanks!


Solution

  • Here is the list of valid timezones:

    http://en.wikipedia.org/wiki/List_of_tz_database_time_zones

    You can use

    TIME_ZONE = 'Europe/Istanbul'
    

    for UTC+02:00