chiark / gitweb /
site: make the locale work on Windows as well.
authorVladimír Vondruš <mosra@centrum.cz>
Thu, 21 Dec 2017 17:04:33 +0000 (18:04 +0100)
committerVladimír Vondruš <mosra@centrum.cz>
Thu, 21 Dec 2017 17:04:33 +0000 (18:04 +0100)
site/pelicanconf.py

index 17052e01c44976a7fae2a02af3fc705d97ba3b2f..4bdd4e6cadef7e6f2da0c2f747394597621b7948 100644 (file)
@@ -39,7 +39,12 @@ PAGE_PATHS = ['']
 TIMEZONE = 'Europe/Prague'
 
 DEFAULT_LANG = 'en'
-DATE_FORMATS = {'en': ('en_US.UTF-8', '%b %d, %Y')}
+
+import platform
+if platform.system() == 'Windows':
+    DATE_FORMATS = {'en': ('usa', '%b %d, %Y')}
+else:
+    DATE_FORMATS = {'en': ('en_US.UTF-8', '%b %d, %Y')}
 
 # Feed generation is usually not desired when developing
 FEED_ATOM = None