Mercurial > public > mercurial-scm > hg
diff tests/test-command-template.t @ 29636:84ef4517de03 stable
date: refactor timezone parsing
We want to be able to accept ISO 8601 style timezones that don't
include a space separator, so we change the timezone parsing function
to accept a full date string and return both the offset and the
non-timezone portion.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Wed, 27 Jul 2016 15:14:19 -0500 |
parents | 1a129dd05b7d |
children | cc11079644fc |
line wrap: on
line diff
--- a/tests/test-command-template.t Thu Jul 28 08:53:36 2016 -0700 +++ b/tests/test-command-template.t Wed Jul 27 15:14:19 2016 -0500 @@ -3253,6 +3253,9 @@ 1970-01-01 09:00 +0900 $ TZ=JST-09 hg log -r0 -T '{localdate(date, "UTC")|isodate}\n' 1970-01-01 00:00 +0000 + $ TZ=JST-09 hg log -r0 -T '{localdate(date, "blahUTC")|isodate}\n' + hg: parse error: localdate expects a timezone + [255] $ TZ=JST-09 hg log -r0 -T '{localdate(date, "+0200")|isodate}\n' 1970-01-01 02:00 +0200 $ TZ=JST-09 hg log -r0 -T '{localdate(date, "0")|isodate}\n'