]> git.ipfire.org Git - thirdparty/git.git/commit - t/t0006-date.sh
t0006: check --date=format zone offsets
authorJeff King <peff@peff.net>
Thu, 15 Jun 2017 13:51:22 +0000 (09:51 -0400)
committerJunio C Hamano <gitster@pobox.com>
Thu, 15 Jun 2017 21:38:39 +0000 (14:38 -0700)
commit22280d7ee7a4286542e14dd0784cb29703ebb389
tree820c166320cb584c1bb12fcf5df82369da9df0f8
parentc3fbf81a8534cf88ff948d12004eb94929ec1174
t0006: check --date=format zone offsets

We already test that "%z" and "%Z" show the right thing, but
we don't actually check that the time we display is the
correct one. Let's add two new tests:

  1. Test that "format:" shows the time in the author's
     timezone, just like the other time formats.

  2. Test that "format-local:" shows time in the local
     timezone. We don't want to use our normal UTC for this,
     because its offset is zero (so the result would be
     "correct" even if the code forgot to apply the offset
     or applied it in the wrong direction).

     We'll use the EST5 zone, which is already used
     elsewhere in the script (and so is assumed to be
     available everywhere).

Signed-off-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t0006-date.sh