﻿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
34680	inspectdb on mysql timestamp fields leads to timezone issues	Neil McKenzie 	nobody	"When using inspectdb on a MySQL database timestamp columns are generated as DateTime fields in Django models. On the surface this appears to work, however, MySQL makes timezone adjustments for timestamps and not for datetimes. 

Since Django expects these columns to be datetime, if the server timezone is changed, incorrect dates/times are returned. I saw this in the wild with 
some created_at and updated_at columns that were created as timestamp fields by Laravel.

I'm not sure if this is something that should be fixed. Maybe the inspectdb feature could give a warning when encountering these columns, or this could be documented as a caveat in the section on inspectdb and/or the howto on dealing with legacy databases.

"	Uncategorized	closed	Database layer (models, ORM)	4.2	Normal	duplicate	inspectdb, mysql, timestamp		Unreviewed	0	0	0	0	0	0
