Changeset - 9ff4b82f56c9
[Not reviewed]
default
0 1 0
Thomas De Schampheleire - 11 years ago 2015-02-26 22:51:27
thomas.de.schampheleire@gmail.com
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.
1 file changed with 1 insertions and 2 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/helpers.py
Show inline comments
 
@@ -469,8 +469,7 @@ def show_id(cs):
 

	
 
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 ""
 

	
0 comments (0 inline, 0 general)