From 0834c11df1146d2f26852450783d37de71f7192b Mon Sep 17 00:00:00 2001 From: Maarten ter Huurne Date: Sat, 18 Jan 2014 13:13:12 +0100 Subject: [PATCH] Avoid localized month name in build date A localized month name can contain non-ASCII characters, which will be inserted in the string in a locale-specific encoding by strftime(). This can lead to problems: see this forum thread for an example where an a-umlaut in a Swedish month name led to a build failure: http://twinery.org/forum/index.php/topic,756.0.html I picked the ISO 8601 date format for the numeric-only date. --- tiddlywiki.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiddlywiki.py b/tiddlywiki.py index 798984a..0c77ab7 100644 --- a/tiddlywiki.py +++ b/tiddlywiki.py @@ -108,7 +108,7 @@ def insertEngine(app, output, filename, label, extra = ''): # Insert version number output = output.replace('"VERSION"', "Made in " + app.NAME + " " + app.VERSION) # Insert timestamp - output = output.replace('"TIME"', "Built on "+time.strftime("%d %b %Y at %H:%M:%S, %z")) + output = output.replace('"TIME"', "Built on "+time.strftime("%Y-%m-%d at %H:%M:%S, %z")) # Insert the test play "start at passage" value if (startAt):