﻿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
35858	Issue with make_aware Function Causing Timezone Conversion Errors with pytz	acture	acture	"I have encountered a problem with the make_aware function used in Django for converting naive datetime objects to aware datetime objects. 

Steps to Reproduce:
1. Create a naive datetime object that falls within a DST transition period.
2. Call make_aware with this naive datetime and a timezone that observes DST.
3. Observe the incorrect timezone conversion.

Code Snippet to reproduce issue
{{{
from datetime import datetime
import pytz
from django.utils.timezone import make_aware

time_str = ""2024-10-22""
time_obj = datetime.strptime(time_str, ""%Y-%m-%d"")
shanghai_tz = pytz.timezone(""Asia/Shanghai"")

pytz_aware_time = shanghai_tz.localize(time_obj)
django_aware_time = make_aware(time_obj, timezone=shanghai_tz)

print(f""pytz_aware_time: {pytz_aware_time}"")
print(f""django_aware_time: {django_aware_time}"")
}}}

Output:
pytz_aware_time: 2024-10-22 00:00:00+08:00
django_aware_time: 2024-10-22 00:00:00+08:06


Environment:
- Django version: Django 5.0.9
- Python version: Python 3.12
- Operating system: macOS Sonoma 14.5"	Bug	closed	Utilities	5.0	Normal	invalid	timezone	acture	Unreviewed	0	0	0	0	1	0
