﻿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
32147	timezone error when casting a naive date in a Daylight Saving Time Change	Clara	nobody	"When you use a model with datetime with a timezone active and naive data as input, it raise the follow error:

{{{
File ""<basepath>/lib/python3.7/site-packages/pytz/tzinfo.py"", line 234, in localize
    raise AmbiguousTimeError(dt)
pytz.exceptions.AmbiguousTimeError: 2020-10-25 02:00:01
}}}

The steps to reproduce are:

1. '''Use a model with datetime''': In this example, we are going to create a user model that extends AbstractUser, but you could use any model with a datetime field

{{{
class User(AbstractUser):
    class Meta:
        db_table = 'my_user'

    created_at = models.DateTimeField(default=timezone.now)
    updated_at = models.DateTimeField(auto_now=True)
    last_password_change = models.DateTimeField(null=True)
}}}

2. '''Create an object with a string naive date''':

{{{
    User.objects.create(
        email = ""test@amail.it"",
        username = ""user_25"",
        created_at = ""2020-10-25 02:00:01""
    )
}}}

* The timezone settings are:
TIME_ZONE = 'Europe/Rome'
USE_TZ = True

Database configuration has not timezone set
"	Bug	assigned	Utilities	3.1	Normal		timezone		Unreviewed	0	0	0	0	0	0
