django-rest-framework icon indicating copy to clipboard operation
django-rest-framework copied to clipboard

Django server time is different from my local time on ubuntu machine

Open yanama123 opened this issue 8 years ago • 1 comments

Hi @rpkilby @tomchristie @xordoquy I am using Django rest framework in my project . I am facing an issue on timezone . Django server time is different from local time. Que 1: How to detect automatically time from customer end , they may have different time zones i cannot hardcode that, will it automatically detect time and date ? Que 2: Can i make TIMEZONE= None in my settings.py file ? because if i add this parameter as None It works fine for me . Que 3: My project doesn't need database , so i put it in comments in setting.py file.. will it impact anywhere ?

please suggest me any sol asap / thanks

Steps to reproduce

$ python manage.py runserver my Settings.py --> TIMEZONE='UTC' USE_TZ=False

Expected behavior:

example: my ubuntu time is sept 03,2018 - 18:51:11

Actual behavior

sept 03, 2018 - 21:57:11

yanama123 avatar Sep 04 '18 13:09 yanama123

This isn’t specific to Django REST framework. I’d suggest taking the question to the django-users mailing list - hopefully someone will be able to point you in the right direction there.

lovelydinosaur avatar Sep 05 '18 14:09 lovelydinosaur