1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-09 01:18:19 +03:00

test: add test cases for timestamp with time zone

(cherry picked from commit 25999f868f)
This commit is contained in:
Yu Watanabe 2024-10-08 13:52:40 +09:00 committed by Luca Boccassi
parent 38d55448b9
commit b64601d454

View File

@ -161,6 +161,13 @@ systemd-analyze calendar --base-time=yesterday --iterations=5 '*-* *:*:*'
systemd-analyze timestamp now systemd-analyze timestamp now
systemd-analyze timestamp -- -1 systemd-analyze timestamp -- -1
systemd-analyze timestamp yesterday now tomorrow 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 yesterday never tomorrow)
(! systemd-analyze timestamp 1) (! systemd-analyze timestamp 1)
(! systemd-analyze timestamp '*-2-29 0:0:0') (! systemd-analyze timestamp '*-2-29 0:0:0')