Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Fixed #5846 -- Bullet-proofed the default timezone encoding test.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7184 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 2dbb08e5dc7fe97d912855de530713a4ff7e42c0 1 parent d5d2072
Malcolm Tredinnick authored February 29, 2008

Showing 1 changed file with 5 additions and 1 deletion. Show diff stats Hide diff stats

  1. 6  django/utils/tzinfo.py
6  django/utils/tzinfo.py
@@ -5,7 +5,11 @@
5 5
 from datetime import timedelta, tzinfo
6 6
 from django.utils.encoding import smart_unicode
7 7
 
8  
-DEFAULT_ENCODING = locale.getdefaultlocale()[1] or 'ascii'
  8
+try:
  9
+    DEFAULT_ENCODING = locale.getdefaultlocale()[1] or 'ascii'
  10
+except:
  11
+    # Any problems at all determining the locale and we fallback. See #5846.
  12
+    DEFAULT_ENCODING = 'ascii'
9 13
 
10 14
 class FixedOffset(tzinfo):
11 15
     "Fixed offset in minutes east from UTC."

0 notes on commit 2dbb08e

Please sign in to comment.
Something went wrong with that request. Please try again.