﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
16957	Timezone changes on development server after first request	antti.a.laine@…	nobody	"When using development server, the time returned by datetime, time and other modules is in different timezone after the first request has been served.

settings.py:
{{{#!python
TIME_ZONE = 'Europe/Helsinki'
}}}

Example view:
{{{#!python
from datetime import datetime

now = datetime.now()
utc = datetime.utcnow()
return HttpResponse(""now = %s\nutc = %s\n"" % (now, utc))
}}}

At the time of writing in this gives:
{{{
now = 2011-09-29 11:55:15.651728
utc = 2011-09-29 08:55:15.651732
}}}

...when the request is done after starting the development server, and
{{{
now = 2011-09-29 08:55:16.631865
utc = 2011-09-29 08:55:16.631903
}}}

...after making the request the second time.

It does not matter which request is first handled; the timezone gets changed when any request gets run after starting the development server. This bug is not present when running on a production server (Google App Engine in this case)."	Bug	closed	Core (Other)	1.3	Normal	worksforme		romain	Unreviewed	0	0	0	0	0	0
