diff options
author | Scott Moser <smoser@brickies.net> | 2017-03-13 14:35:29 -0400 |
---|---|---|
committer | Scott Moser <smoser@brickies.net> | 2017-03-13 14:35:29 -0400 |
commit | 66dfb0915d4abf3f61948f281c4aff8394494ed3 (patch) | |
tree | e61d834e14af9a490baed7699eab97cfd9d99eed /tests/cloud_tests/configs/modules/timezone.yaml | |
parent | 482b2746b5919233afec55776d5fc996cdc2f38e (diff) | |
download | vyos-cloud-init-66dfb0915d4abf3f61948f281c4aff8394494ed3.tar.gz vyos-cloud-init-66dfb0915d4abf3f61948f281c4aff8394494ed3.zip |
test: avoid differences in 'date' output due to daylight savings.
When testing for timezone we were testing that 'date' output would
contain 'HDT' for the current time. But after a 'spring forward', the
current time started to have 'HST'.
Instead of asking 'date' for the timezone that applies now, ask it
for a static date.
Diffstat (limited to 'tests/cloud_tests/configs/modules/timezone.yaml')
-rw-r--r-- | tests/cloud_tests/configs/modules/timezone.yaml | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/cloud_tests/configs/modules/timezone.yaml b/tests/cloud_tests/configs/modules/timezone.yaml index 6a05aba1..8c96ed47 100644 --- a/tests/cloud_tests/configs/modules/timezone.yaml +++ b/tests/cloud_tests/configs/modules/timezone.yaml @@ -7,6 +7,8 @@ cloud_config: | collect_scripts: timezone: | #!/bin/bash - date +%Z + # date will convert this to system's configured time zone. + # use a static date to avoid dealing with daylight savings. + date "+%Z" --date="Thu, 03 Nov 2016 00:47:00 -0400" # vi: ts=4 expandtab |