[PATCH] date representation: use ISO8601 rather than a specific locale
Thomas De Schampheleire
patrickdepinguin at gmail.com
Thu Feb 26 16:58:20 EST 2015
On Thu, Feb 26, 2015 at 10:51 PM, Thomas De Schampheleire
<patrickdepinguin at gmail.com> wrote:
> # HG changeset patch
> # User Thomas De Schampheleire <thomas.de.schampheleire at gmail.com>
> # Date 1424987487 -3600
> # Thu Feb 26 22:51:27 2015 +0100
> # Node ID d80090d1053468f6b84eb8ef41c62446995ddb73
> # Parent c7f97c237dacbed8770d4aacf20feb8175ee8d99
> 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 --git a/kallithea/lib/helpers.py b/kallithea/lib/helpers.py
> --- a/kallithea/lib/helpers.py
> +++ b/kallithea/lib/helpers.py
> @@ -469,7 +469,7 @@
>
> def fmt_date(date):
> if date:
> - _fmt = u"%a, %d %b %Y %H:%M:%S".encode('utf8')
> + _fmt = u"%Y-%m-%d %H:%M:%S".encode('utf8')
> return date.strftime(_fmt).decode('utf8')
>
> return ""
In some way related: certain dates in Kallithea are shown as an age '5
days ago' rather than an expanded date.
What is the strategy: when should we use what? Or should we always
show the age with the date as tooltip?
More information about the kallithea-general
mailing list