]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: add test cases for timestamp with time zone
authorYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 8 Oct 2024 04:52:40 +0000 (13:52 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Tue, 8 Oct 2024 10:36:38 +0000 (19:36 +0900)
test/units/TEST-65-ANALYZE.sh

index 76db01d68a6abda79bc7c0ca17c7629e43e65ba2..c00559f6fbba9d896897fb9061dcb7e07b24e81a 100755 (executable)
@@ -172,6 +172,13 @@ systemd-analyze calendar --base-time=yesterday --iterations=5 '*-* *:*:*'
 systemd-analyze timestamp now
 systemd-analyze timestamp -- -1
 systemd-analyze timestamp yesterday now tomorrow
+systemd-analyze timestamp 'Fri 2012-11-23 23:02:15'
+systemd-analyze timestamp 'Fri 2012-11-23 23:02:15 UTC'
+systemd-analyze timestamp 'Fri 2012-11-23 23:02:15 CET'
+for i in $(timedatectl list-timezones); do
+    [[ -e "/usr/share/zoneinfo/$i" ]] || continue
+    systemd-analyze timestamp "Fri 2012-11-23 23:02:15 $i"
+done
 (! systemd-analyze timestamp yesterday never tomorrow)
 (! systemd-analyze timestamp 1)
 (! systemd-analyze timestamp '*-2-29 0:0:0')