Test daylight time for strflocaltime (#3323)
This test case covers the behavior described in issue #1912, fixed by #3203.
This commit is contained in:
1 parent
931a362f8b
commit
77d23e9a5f
1 file changed
+7
@@ -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
|
||||
|
||||
Reference in new issue
Block a user