Commits

David Chambers committed d6fc1b8

Updated `display_date_or_time` to ensure that `time.strftime` receives `format` in string form.

Comments (0)

Files changed (1)

templatetags/mango_extras.py

     format = re.sub(r'(?<!%)%d', '{{%d|unpad}}', format)
     format = re.sub(r'(?<!%)%D', '%d', format) # default
 
-    string = time.strftime(format, struct_time)
+    string = time.strftime(format.encode('utf-8'), struct_time)
     string = string.lower() if format_as == 'time' else string
 
     funcs = {