﻿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
34371	Support creating aware datetime objects using django.utils.timezone	Ebram Shehata	nobody	"I think it'd be convenient if we support creating datetime objects using django.utils.timezone.
Maybe something like:

{{{
from django.utils import timezone


dt = timezone.datetime(year=2023, month=2, day=25)
}}}

and that will give a timezone aware datetime (based on `settings.TIME_ZONE`).


Use case: I'm currently working on a project in which I needed to manually create an initial datetime object and compare it later with another one created using `timezone.now()` but I had an error raised from DRF:

`can't compare offset-naive and offset-aware datetimes`

As the error explains, it can't compare naive and aware offsets! It'd be good to be able to create new datetime objects using django's timezone module without having to do it using other work arounds."	New feature	closed	Utilities	4.1	Normal	wontfix	utils, datetime		Unreviewed	0	0	0	0	0	0
