﻿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
37104	Naive timestamps used in migrations should reference the same timezone	James Beith		"When creating a migration there are two reference timestamps; one in the filename (e.g. `0002_auto_20260518_0601.py`) and one in the source header (e.g. `# Generated by Django 6.0.5 on 2026-05-18 05:01`).

The filename is [https://github.com/django/django/blob/6.0.5/django/db/migrations/utils.py#L24 created here], using current local date and time (from Python's runtime perspective), in this example `""Europe/London""`.

The source header is [https://github.com/django/django/blob/6.0.5/django/db/migrations/writer.py#L206 created here], using UTC if `settings.USE_TZ`, otherwise current local date and time similar to filename.

This can lead to different (naive) timestamps used in the filename and source header. Is there any reason why they shouldn't be the same?

In terms of a fix, I think the change might be to have the filename call the Django timezone util instead of straight to Python's now classmethod."	Cleanup/optimization	new	Database layer (models, ORM)	6.0	Normal				Unreviewed	0	0	0	0	0	0
