I've a problem that Django on AWS EC2 Ubuntu 12.04 server using this the following view returns UTC timestamp:
import time
from django.utils.datetime_safe import datetime
def currentTime(request):
return HttpResponse(json.dumps({"time": int(time.mktime(datetime.now().timetuple())) }), mimetype="application/json")
1370604628 at the time of writing. Ubuntu is set to EDT timezone and Django's settings.py is set to "America/New_York". What's even stranger Javascript is returning UTC timezone when using new Date();
My USE_TZ is set to False, but I've tried setting it to True without success.
The server is nginx and it's proxying to uWSGI. Is there anyone who knows how to resolve this issue? Or another way to sync time between client JS and django?