# HG changeset patch # User Thomas De Schampheleire # Date 1424987487 -3600 # Node ID 9ff4b82f56c980425b553291e384bc14cec559fd # Parent 5a1cd703a888b03cc0a65ecf44dba6d8645a0a8d date representation: use ISO8601 rather than a specific locale Dates, in particular in technical systems like Kallithea, are better shown in a clear concise format like ISO8601 (YYYY-MM-DD) than in a verbose format like 'Thu, Feb 26 2015'. This commit changes all dates to ISO8601. --- If desired, we could create two functions: one that returns ISO format and another for the locale format. Depending on the usage, one or the other is shown. I'm not very fond of that though, it looks inconsistent. diff -r 5a1cd703a888 -r 9ff4b82f56c9 kallithea/lib/helpers.py --- a/kallithea/lib/helpers.py Thu Feb 26 16:44:47 2015 +0100 +++ b/kallithea/lib/helpers.py Thu Feb 26 22:51:27 2015 +0100 @@ -469,8 +469,7 @@ def fmt_date(date): if date: - _fmt = u"%a, %d %b %Y %H:%M:%S".encode('utf8') - return date.strftime(_fmt).decode('utf8') + return date.strftime("%Y-%m-%d %H:%M:%S").decode('utf8') return ""