--
Ticket URL: <https://code.djangoproject.com/ticket/22814>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0
Comment:
Where does Django call `parse_datetime` on a value returned by PostgreSQL?
If it never does, I'd just document the expected format.
--
Ticket URL: <https://code.djangoproject.com/ticket/22814#comment:1>
Comment (by Naddiseo):
`django.db.models.fields.DateTimeField` calls it in its `to_python`
method. I recommend django switch to be closer to ISO-8601 which allows
the following formats: Z; [+-]hh:mm, [+-]hhmm, [+-]hh
Currently `parse_datetime` allows all except the last case which was taken
out in 2f59e94a4150c84c8b4 because it (mistakenly) also allowed [+-]hm
I propose that [+-]hh be reintroduced with the semantics outlined in
ISO-8601. (I'll create a PR)
--
Ticket URL: <https://code.djangoproject.com/ticket/22814#comment:2>
* owner: nobody => aaugustin
* status: new => assigned
* stage: Unreviewed => Accepted
Comment:
Wikipedia confirms that `±hh` is supported. Let's do this.
--
Ticket URL: <https://code.djangoproject.com/ticket/22814#comment:3>
* stage: Accepted => Unreviewed
Comment:
https://github.com/django/django/pull/2804
--
Ticket URL: <https://code.djangoproject.com/ticket/22814#comment:4>
* has_patch: 0 => 1
* stage: Unreviewed => Ready for checkin
Comment:
Looks good. My only comment is the most insignificant I ever left on a PR
:-) If you can amend the commit and force-push it, I'll merge it.
--
Ticket URL: <https://code.djangoproject.com/ticket/22814#comment:5>
* cc: django@… (added)
Comment:
Done, and flake8 passes on both changed files.
--
Ticket URL: <https://code.djangoproject.com/ticket/22814#comment:6>
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"7beaeeed2b99ec120486ee53e1eb7f1fe2515b9c"]:
{{{
#!CommitTicketReference repository=""
revision="7beaeeed2b99ec120486ee53e1eb7f1fe2515b9c"
Fixed #22814 -- Allowed ISO-8601 [+-]hh timezone format in parse_datetime
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22814#comment:7>
Comment (by Aymeric Augustin <aymeric.augustin@…>):
In [changeset:"26cd19561331ac4a8a5f084a30c8ba0123d33278"]:
{{{
#!CommitTicketReference repository=""
revision="26cd19561331ac4a8a5f084a30c8ba0123d33278"
Merge pull request #2804 from AsymmetricVentures/issue22814
Fixed #22814 -- Allowed ISO-8601 [+-]hh timezone format in parse_datetime
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22814#comment:8>
Comment (by anonymous):
Any chance of getting this backported to 1.7 and/or 1.6?
--
Ticket URL: <https://code.djangoproject.com/ticket/22814#comment:9>
Comment (by aaugustin):
I'll do it for 1.7.
I'd rather not do it in 1.6. I'm wary of making small changes in low level
utilities in stable versions because people tend to rely on the exact
behaviour, sometimes after checking the source.
--
Ticket URL: <https://code.djangoproject.com/ticket/22814#comment:10>
Comment (by Aymeric Augustin <aymeric.augustin@…>):
In [changeset:"8dcc7810f07e2ce76ebee50c70a5c16f1bc9edec"]:
{{{
#!CommitTicketReference repository=""
revision="8dcc7810f07e2ce76ebee50c70a5c16f1bc9edec"
[1.7.x] Fixed #22814 -- Allowed ISO-8601 [+-]hh timezone format in
parse_datetime
Backport of 7beaeeed from master.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/22814#comment:11>