Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ValueError: Incorrect timezone setting while migrating manage.py file in Django

I am following the Django official documentation for writing my first app using Django.

Here, it says that I have to set TIME_ZONE to my time zone in the settings.py file.

The default value of TIME_ZONE was "utc" and i have changed it to "utc+6.00".

After this edit, when I try to migrate the manage.py file:

python manage.py migrate

A value error occurred:

ValueError: Incorrect timezone setting: UTC+6.00

I am sorry, if this is a very basic question, but I couldn't figure out the solution after hours of search in Google.

N.B:

My time zone is Asia/Dhaka (+6:00)

My OS is Ubuntu 14.10

like image 563
ni8mr Avatar asked Nov 28 '14 05:11

ni8mr


2 Answers

According to the documentation:

TIME_ZONE

Default: 'America/Chicago'

A string representing the time zone for this installation, or None.

Instead of utc+6.00, set the TIME_ZONE to Asia/Dhaka:

TIME_ZONE = 'Asia/Dhaka'
like image 139
alecxe Avatar answered Sep 29 '22 12:09

alecxe


In simple words you need to choose your timezone from this list

like image 34
Ivan Kolesnikov Avatar answered Sep 29 '22 14:09

Ivan Kolesnikov