[Django] #23668: make_aware() and make_naive() should default to the current timezone

23 views
Skip to first unread message

Django

unread,
Oct 16, 2014, 12:26:45 PM10/16/14
to django-...@googlegroups.com
#23668: make_aware() and make_naive() should default to the current timezone
-----------------------------+--------------------
Reporter: jdufresne | Owner: nobody
Type: New feature | Status: new
Component: Utilities | Version: master
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------+--------------------
Currently, the timezone utility functions `make_aware()` and
`make_naive()` require two arguments, a datetime object and a timezone.
With `make_aware()`, frequently the user will need to convert a naive
datetime object to the current (or default) timezone. As this appears to
be the most common usage of `make_aware()` it ought to be the default.
Therefore the function will be easier to use and will "do the right thing"
by default.

Pull request <https://github.com/django/django/pull/3377>

--
Ticket URL: <https://code.djangoproject.com/ticket/23668>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Oct 16, 2014, 7:22:19 PM10/16/14
to django-...@googlegroups.com
#23668: make_aware() and make_naive() should default to the current timezone
-----------------------------+------------------------------------

Reporter: jdufresne | Owner: nobody
Type: New feature | Status: new
Component: Utilities | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+------------------------------------
Changes (by timgraham):

* needs_better_patch: => 0
* has_patch: 0 => 1
* stage: Unreviewed => Accepted
* needs_tests: => 0
* needs_docs: => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/23668#comment:1>

Django

unread,
Oct 20, 2014, 9:52:20 AM10/20/14
to django-...@googlegroups.com
#23668: make_aware() and make_naive() should default to the current timezone
-----------------------------+---------------------------------------------

Reporter: jdufresne | Owner: nobody
Type: New feature | Status: new
Component: Utilities | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for checkin

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+---------------------------------------------
Changes (by timgraham):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/23668#comment:2>

Django

unread,
Oct 20, 2014, 12:42:36 PM10/20/14
to django-...@googlegroups.com
#23668: make_aware() and make_naive() should default to the current timezone
-----------------------------+---------------------------------------------
Reporter: jdufresne | Owner: nobody
Type: New feature | Status: closed
Component: Utilities | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-----------------------------+---------------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: new => closed
* resolution: => fixed


Comment:

In [changeset:"59026bfbf957cd31c659bdfac36d992816eba114"]:
{{{
#!CommitTicketReference repository=""
revision="59026bfbf957cd31c659bdfac36d992816eba114"
Fixed #23668 -- Changed make_aware() and make_naive() to use the current
timezone by default

Thanks Aymeric Augustin for review.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23668#comment:3>

Django

unread,
Jan 18, 2018, 11:21:36 AM1/18/18
to django-...@googlegroups.com
#23668: make_aware() and make_naive() should default to the current timezone
-------------------------------------+-------------------------------------
Reporter: Jon Dufresne | Owner: nobody
Type: New feature | Status: closed
Component: Utilities | Version: master

Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"3c34452ab5e5de816357aee99cd2a98a0c7c4e50" 3c34452a]:
{{{
#!CommitTicketReference repository=""
revision="3c34452ab5e5de816357aee99cd2a98a0c7c4e50"
Refs #23668 -- Removed passing default argument of current TZ to
make_aware()/naive.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/23668#comment:4>

Reply all
Reply to author
Forward
0 new messages