Hi is it possible to convert datetime field in django to GMT timezones or what ever timezones we need in the models.py like
online_date = models.DateTimeField(timezones=GMT)
or should i write in python externally to change the format
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’ve found it is best to have the server timezone set to UTC and then convert dates based on required timezones (for example, the users preferences), rather than storing different timezoned dates in the database. This requires no changing of timezones at the layer you are concerned with.