From b89d409bf7ed7f9d6248c1ec188e241bdf5d4aa2 Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Tue, 26 Jun 2007 13:55:28 +0000 Subject: [PATCH] Worked around the situation when getdefaultlocale() might return (None, None), which apparently can happen. git-svn-id: http://code.djangoproject.com/svn/django/branches/unicode@5546 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/utils/tzinfo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django/utils/tzinfo.py b/django/utils/tzinfo.py index 0c85735941..e2e1d10fc1 100644 --- a/django/utils/tzinfo.py +++ b/django/utils/tzinfo.py @@ -5,7 +5,7 @@ import time from datetime import timedelta, tzinfo from django.utils.encoding import smart_unicode -DEFAULT_ENCODING = locale.getdefaultlocale()[1] +DEFAULT_ENCODING = locale.getdefaultlocale()[1] or 'ascii' class FixedOffset(tzinfo): "Fixed offset in minutes east from UTC."