explicitly set timezone for tests that depend on it
authorPhilipp Gesang <philipp.gesang@intra2net.com>
Thu, 25 Apr 2019 14:20:36 +0000 (16:20 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Thu, 1 Aug 2024 12:55:33 +0000 (14:55 +0200)
commitfd3a4c21c402dca21354f871cca0a11e19070ddd
tree37679f3de8d1edf38781deb4c50fd456c6b16cec
parentfd4923b0df677f9bfe3789934e002e6dd9aa3102
explicitly set timezone for tests that depend on it

Some timefunc tests rely on the time zone to be CE[S]T and will
fail otherwise. Not a good thing for a correctness test to do, so
set the zone explicitly in those cases. Example:

    $ ./test/test_i2ncommon --run_test=TestTimeFunc/FormatFullTime
    Running 1 test case...

    *** No errors detected
    $ TZ=UTC ./test/test_i2ncommon --run_test=TestTimeFunc/FormatFullTime
    Running 1 test case...
    /home/philipp/src/i2ncommon/libi2ncommon-git/test/test_timefunc.cpp(480): error: in "TestTimeFunc/FormatFullTime": check "17.10.2011 11:33" == format_full_time(seconds) has failed [17.10.2011 11:33 != 17.10.2011 09:33]
test/test_timefunc.cpp