Skip to content

Commit b258237

Browse files
committed
Merge branch 'dd/t9604-use-posix-timezones'
The cvsimport tests required that the platform understands traditional timezone notations like CST6CDT, which has been updated to work on those systems as long as they understand POSIX notation with explicit tz transition dates. * dd/t9604-use-posix-timezones: t9604: Fix test for musl libc and new Debian
2 parents 5615be3 + 03e84cc commit b258237

File tree

1 file changed

+23
-6
lines changed

1 file changed

+23
-6
lines changed

t/t9604-cvsimport-timestamps.sh

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,28 @@
33
test_description='git cvsimport timestamps'
44
. ./lib-cvs.sh
55

6+
test_lazy_prereq POSIX_TIMEZONE '
7+
local tz=XST-1XDT,M3.5.0,M11.1.0
8+
echo "1711846799 -> 2024-03-31 01:59:59 +0100" >expected &&
9+
TZ="$tz" test-tool date show:iso-local 1711846799 >actual &&
10+
test_cmp expected actual &&
11+
echo "1711846800 -> 2024-03-31 03:00:00 +0200" >expected &&
12+
TZ="$tz" test-tool date show:iso-local 1711846800 >actual &&
13+
test_cmp expected actual &&
14+
echo "1730591999 -> 2024-11-03 01:59:59 +0200" >expected &&
15+
TZ="$tz" test-tool date show:iso-local 1730591999 >actual &&
16+
test_cmp expected actual &&
17+
echo "1730592000 -> 2024-11-03 01:00:00 +0100" >expected &&
18+
TZ="$tz" test-tool date show:iso-local 1730592000 >actual &&
19+
test_cmp expected actual
20+
'
21+
622
setup_cvs_test_repository t9604
723

8-
test_expect_success PERL 'check timestamps are UTC (TZ=CST6CDT)' '
24+
test_expect_success PERL,POSIX_TIMEZONE 'check timestamps are UTC' '
925
10-
TZ=CST6CDT git cvsimport -p"-x" -C module-1 module &&
26+
TZ=CST6CDT,M4.1.0,M10.5.0 \
27+
git cvsimport -p"-x" -C module-1 module &&
1128
git cvsimport -p"-x" -C module-1 module &&
1229
(
1330
cd module-1 &&
@@ -34,13 +51,13 @@ test_expect_success PERL 'check timestamps are UTC (TZ=CST6CDT)' '
3451
test_cmp expect-1 actual-1
3552
'
3653

37-
test_expect_success PERL 'check timestamps with author-specific timezones' '
54+
test_expect_success PERL,POSIX_TIMEZONE 'check timestamps with author-specific timezones' '
3855
3956
cat >cvs-authors <<-EOF &&
4057
user1=User One <[email protected]>
41-
user2=User Two <[email protected]> CST6CDT
42-
user3=User Three <[email protected]> EST5EDT
43-
user4=User Four <[email protected]> MST7MDT
58+
user2=User Two <[email protected]> CST6CDT,M4.1.0,M10.5.0
59+
user3=User Three <[email protected]> EST5EDT,M4.1.0,M10.5.0
60+
user4=User Four <[email protected]> MST7MDT,M4.1.0,M10.5.0
4461
EOF
4562
git cvsimport -p"-x" -A cvs-authors -C module-2 module &&
4663
(

0 commit comments

Comments
 (0)