chiark / gitweb /
Screw the locale encoding issues, display dates as numbers and add our own day-of...
authordaid <daid303@gmail.com>
Wed, 7 Aug 2013 07:06:29 +0000 (09:06 +0200)
committerdaid <daid303@gmail.com>
Wed, 7 Aug 2013 07:06:29 +0000 (09:06 +0200)
Cura/util/profile.py

index 3d0b66b0fdaae480afe20078bb6b7a3a02cc018c..26ce4e32d44c3978d2f452a4d48c1d8ef7897cee 100644 (file)
@@ -698,11 +698,11 @@ def replaceTagMatch(m):
        pre = m.group(1)
        tag = m.group(2)
        if tag == 'time':
-               return pre + time.strftime('%H:%M:%S').encode('ascii', 'replace')
+               return pre + time.strftime('%H:%M:%S')
        if tag == 'date':
-               return pre + time.strftime('%d %b %Y').encode('ascii', 'replace')
+               return pre + time.strftime('%d-%m-%Y')
        if tag == 'day':
-               return pre + time.strftime('%a').encode('ascii', 'replace')
+               return pre + ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'][int(time.strftime('%w'))]
        if tag == 'print_time':
                return pre + '#P_TIME#'
        if tag == 'filament_amount':