[PATCH] use iso8601-compliant dates by default (issue812)

John Coomes John.Coomes at sun.com
Thu Feb 7 17:28:23 CST 2008


Dirkjan Ochtman (dirkjan at ochtman.nl) wrote:
> # HG changeset patch
> # User Dirkjan Ochtman <dirkjan at ochtman.nl>
> # Date 1202423525 -3600
> # Node ID 0f55c22e4016f3248d931f931a3ef1363d725225
> # Parent  f89f7ecf017ec0c9a92d466aa682c737e98f8190
> use iso8601-compliant dates by default (issue812)
> 
> diff -r f89f7ecf017e -r 0f55c22e4016 mercurial/util.py
> --- a/mercurial/util.py	Thu Feb 07 13:20:45 2008 +0100
> +++ b/mercurial/util.py	Thu Feb 07 23:32:05 2008 +0100
> @@ -1489,7 +1489,7 @@
>          tz = time.timezone
>      return time.mktime(lt), tz
>  
> -def datestr(date=None, format='%a %b %d %H:%M:%S %Y', timezone=True, timezone_format=" %+03d%02d"):
> +def datestr(date=None, format='%Y-%m-%d %H:%M:%S', timezone=True, timezone_format=" %+03d%02d"):
> ...

Cool.  But I thought iso 8601 requires a literal 'T' between the date
and time?  E.g.,

	2008-02-07T15:28:01

-John



More information about the Mercurial-devel mailing list