From 32db9abd0366503aaace6cdd27b33cc74e87cfd8 Mon Sep 17 00:00:00 2001 From: daid Date: Wed, 7 Aug 2013 09:06:29 +0200 Subject: [PATCH] Screw the locale encoding issues, display dates as numbers and add our own day-of-week always english list. I have had it with this issue, until python 3 comes along it is just too random. --- Cura/util/profile.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Cura/util/profile.py b/Cura/util/profile.py index 3d0b66b0..26ce4e32 100644 --- a/Cura/util/profile.py +++ b/Cura/util/profile.py @@ -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': -- 2.30.2