From 77d23e9a5fe41d681d8a6239f4cb1e1632f968d5 Mon Sep 17 00:00:00 2001 From: Steven Ihde Date: Wed, 14 May 2025 15:16:25 -0700 Subject: [PATCH] Test daylight time for strflocaltime (#3323) This test case covers the behavior described in issue #1912, fixed by #3203. --- tests/shtest | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tests/shtest b/tests/shtest index 3cfe5f45..e3e48421 100755 --- a/tests/shtest +++ b/tests/shtest @@ -728,6 +728,13 @@ if ! $msys && ! $mingw; then exit 1 fi + # Test when DST is in effect: #1912 + if ! r=$(TZ=Europe/Paris $JQ -rn '1750500000 | strflocaltime("%F %T %z %Z")') \ + || [ "$r" != "2025-06-21 12:00:00 +0200 CEST" ]; then + echo "Incorrectly formatted local time" + exit 1 + fi + if ! r=$(TZ=Europe/Paris $JQ -rn '1731627341 | strftime("%F %T %z %Z")') \ || ( [ "$r" != "2024-11-14 23:35:41 +0000 UTC" ] \ && [ "$r" != "2024-11-14 23:35:41 +0000 GMT" ] ); then