]> arthur.barton.de Git - bup.git/commit
test-tz.sh: test save in a fractional time zone
authorDavid Kettler <kettler@internode.on.net>
Mon, 30 Nov 2015 13:28:28 +0000 (23:58 +1030)
committerRob Browning <rlb@defaultvalue.org>
Sat, 12 Dec 2015 17:18:21 +0000 (11:18 -0600)
commite2073c04660032cf32e3092cfa013c987c589c14
tree38dba2a24bfa864490700c278027b8bfc3db0c20
parentf25ef2e868f85ca19bfce314081c956ade9c10ef
test-tz.sh: test save in a fractional time zone

Prior to this change[1], the commit time zone offset was generated
incorrectly for non-integer hour offsets from UTC; seconds, rather
than minutes, were output.  Such values in a bup commit cause
subsequent attempts to access the repository to fail with "Exception:
cannot parse commit".

When run with TZ=Australia/Adelaide the test suite failed in several
places.  Add a test which sets the time zone explicitly and tests a
save for consistency.

[1] Fix utc_offset_str for fractional TZs
    f25ef2e868f85ca19bfce314081c956ade9c10ef

Signed-off-by: David Kettler <kettler@internode.on.net>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
[rlb@defaultvalue.org: remove proposed utc_offset_str fix; adjust
 commit message]
Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Tested-by: Rob Browning <rlb@defaultvalue.org>
Makefile
t/test-tz.sh [new file with mode: 0755]