Ticket #10335: tzinfo-check-encoding-supported-by-python.diff
File tzinfo-check-encoding-supported-by-python.diff, 727 bytes (added by , 16 years ago) |
---|
-
django/utils/tzinfo.py
4 4 import time 5 5 from datetime import timedelta, tzinfo 6 6 from django.utils.encoding import smart_unicode 7 from encodings import codecs 7 8 8 9 try: 9 10 DEFAULT_ENCODING = locale.getdefaultlocale()[1] or 'ascii' 11 codecs.getdecoder(DEFAULT_ENCODING) # check that it is supported by Python, see #10335 10 12 except: 11 # Any problems at all determining the localeand we fallback. See #5846.13 # Any problems at all determining the encoding and we fallback. See #5846. 12 14 DEFAULT_ENCODING = 'ascii' 13 15 14 16 class FixedOffset(tzinfo):