How to add Indian Standard Time (IST) in Django?

前端 未结 13 558
终归单人心
终归单人心 2021-02-02 06:22

We want to get the current time in India in our Django project. In settings.py, UTC is there by default. How do we change it to IST?

13条回答
  •  日久生厌
    2021-02-02 07:05

    Django stores timestamp so if we just change the TIME_ZONE variable Django will handle rest.

    TIME_ZONE =  'Asia/Kolkata'
    

提交回复
热议问题