﻿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
17062	Using postgres, if you rollback the first transaction on a connection, the effect of settings.TIME_ZONE is lost	Michael Hudson-Doyle	Aymeric Augustin	"The fix for #3459 means that SET TIME ZONE is only called once per connection.  But as per http://www.postgresql.org/docs/8.3/static/sql-set.html:

If SET (or equivalently SET SESSION) is issued within a transaction that is later aborted, the effects of the SET command disappear when the transaction is rolled back.

So if you're unlucky enough for the first transaction on a connect to get rolled back, the effect of settings.TIME_ZONE is lost for the life time of that connection -- which could quite possibly be lifetime of the process.

A simple fix would be to always COMMIT after setting the timezone -- I don't know if that would cause other problems though."	Bug	closed	Database layer (models, ORM)	1.3	Normal	fixed		Michael Hudson-Doyle	Accepted	1	0	0	0	0	0
