PostgreSQL saving date in 'Local time zone' while i set it to 'UTC' with Django

前端 未结 1 1881
伪装坚强ぢ
伪装坚强ぢ 2021-01-25 05:27

I m trying to save date in UTC format, but it being save in my localtimezone It is okay till Django view but after .save() i

相关标签:
1条回答
  • 2021-01-25 05:49

    If you want change timezone of Postgresql, go through this command:

    ALTER USER User_Name SET TimeZone TO 'utc';

    And restart the postgres service through this:

    sudo service postgresql restart

    0 讨论(0)
提交回复
热议问题