Ticket #10335: tzinfo-getdefaultencoding.patch
File tzinfo-getdefaultencoding.patch, 565 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 import sys 7 8 8 9 try: 9 DEFAULT_ENCODING = locale.getdefaultlocale()[1]or 'ascii'10 DEFAULT_ENCODING = sys.getdefaultencoding() or 'ascii' 10 11 except: 11 12 # Any problems at all determining the locale and we fallback. See #5846. 12 13 DEFAULT_ENCODING = 'ascii'