Skip to content

Commit 77d23e9

Browse files
authored
Test daylight time for strflocaltime (#3323)
This test case covers the behavior described in issue #1912, fixed by #3203.
1 parent 931a362 commit 77d23e9

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

tests/shtest

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -728,6 +728,13 @@ if ! $msys && ! $mingw; then
728728
exit 1
729729
fi
730730

731+
# Test when DST is in effect: #1912
732+
if ! r=$(TZ=Europe/Paris $JQ -rn '1750500000 | strflocaltime("%F %T %z %Z")') \
733+
|| [ "$r" != "2025-06-21 12:00:00 +0200 CEST" ]; then
734+
echo "Incorrectly formatted local time"
735+
exit 1
736+
fi
737+
731738
if ! r=$(TZ=Europe/Paris $JQ -rn '1731627341 | strftime("%F %T %z %Z")') \
732739
|| ( [ "$r" != "2024-11-14 23:35:41 +0000 UTC" ] \
733740
&& [ "$r" != "2024-11-14 23:35:41 +0000 GMT" ] ); then

0 commit comments

Comments
 (0)