diff options
| author | Gary Wilson Jr <gary.wilson@gmail.com> | 2007-10-31 03:59:40 +0000 |
|---|---|---|
| committer | Gary Wilson Jr <gary.wilson@gmail.com> | 2007-10-31 03:59:40 +0000 |
| commit | 8c442f21dc7079a880eb626d20b84fc090563dff (patch) | |
| tree | b52a636fb83fd24349bfc3619fdd56f97ebbc280 /tests | |
| parent | 39f28512b9d2776c5bd716a334999e28fd2ac731 (diff) | |
Fixed #5816 -- Fixed a regression from [6333] that generates incorrect cookie "expires" dates when using a locale other than English. Introduced `http_date` and `cookie_date` utility functions. Thanks for the report Michael Lemaire. Thanks for the patch Karen Tracey and `SmileyChris`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6634 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/regressiontests/text/tests.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/regressiontests/text/tests.py b/tests/regressiontests/text/tests.py index 962a30ef19..7cfe44517a 100644 --- a/tests/regressiontests/text/tests.py +++ b/tests/regressiontests/text/tests.py @@ -27,6 +27,14 @@ u'Paris+%26+Orl%C3%A9ans' >>> urlquote_plus(u'Paris & Orl\xe9ans', safe="&") u'Paris+&+Orl%C3%A9ans' +### cookie_date, http_date ############################################### +>>> from django.utils.http import cookie_date, http_date +>>> t = 1167616461.0 +>>> cookie_date(t) +'Mon, 01-Jan-2007 01:54:21 GMT' +>>> http_date(t) +'Mon, 01 Jan 2007 01:54:21 GMT' + ### iri_to_uri ########################################################### >>> from django.utils.encoding import iri_to_uri >>> iri_to_uri(u'red%09ros\xe9#red') |
