by Team Codeasify
412
In this answer - We will take a closer look at how to set or change your desired time zone in your existing Django project.
Here is an example of a newly created Django project directory structure in this case our project name is MyLedger
|── MyLedger
├── __init__.py
├── asgi.py
├── settings.py
├── urls.py
└── wsgi.py
|── manage.py
Steps to set the timezone in the Django project
PATH: MyLedger -> settings.py -> search "TIME_ZONE" -> change
1. Go to your project directory in this case we have the MyLedger
directory.
2. Go to the settings.py
file.
3. Search for TIME_ZONE
if it is available then change it to your desired timezone. if it is not available then add it to your settings.py file. Please see an example given below.
4. Save the settings.py
file.
TIME_ZONE = 'America/New_York'
Hopefully, this answer will help you.