0

I am trying to convert time from America/New_York to other(any) timezone using

from django.utils import timezone

I tried finding references on web but couldn't find it

Sanket Patil
  • 807
  • 1
  • 11
  • 19
  • TIME_ZONE = 'America/New York' ? – inquirer Sep 09 '22 at 15:23
  • I assume you don't want the entire project's timezone to change, if you do the above comment will work. If not, you'd just use normal python timezone stuff: https://stackoverflow.com/questions/4563272/how-to-convert-a-utc-datetime-to-a-local-datetime-using-only-standard-library – Nealium Sep 09 '22 at 15:36

2 Answers2

0

Tested it's working modify into settings.py file

TIME_ZONE = 'Asia/Kolkata'
BiswajitPaloi
  • 586
  • 4
  • 16
0

Change TIME_ZONE variable in settings.py from utc to ...

M.J.GH.PY
  • 75
  • 7