Updated code after executing new testscript

This commit is contained in:
ollo 2016-05-15 22:59:17 +02:00
parent 8c81a73af9
commit 1f73de74d2
2 changed files with 5 additions and 4 deletions

View File

@ -38,7 +38,7 @@ function isSummerTime(time)
-- summer time
return true
-- October is not 100% Summer time, ending with the last sunday
elseif ((time.month == 10 and time.day >= 25 and time.day <= 31 and (time.hour < 2 or (time.hour == 2 and time.minute== 0 and time.second == 0)) and time.dow == 7) or
elseif ((time.month == 10 and time.day >= 25 and time.day <= 31 and (time.hour < 2 ) and time.dow == 7) or
(time.month == 10 and time.day >= 25 and time.day <= 31 and time.dow < 7 and ((7-time.dow + time.day) <= 31)) or
-- Handle all days up to the 25. of october
(time.month == 10 and time.day < 25 )

View File

@ -14,12 +14,13 @@ OUTPUT="$(echo "$OUTPUT" | sed 's;generate;test;')"
echo "Generating $OUTPUT ..."
cat $HEAD > $OUTPUT
# Logic to generate the script
for year in 2016 2017 2020; do
for year in 2016 2017; do
echo "For $year ..."
for month in 3 10; do
for day in {1..31}; do
for hour in {0..23}; do
for day in {21..31}; do
for hour in {1..3}; do
for minutes in {0..59}; do
echo "$year-$month-$day $hour:$minutes"
for seconds in {0..59}; do
timestmp="$year-$month-$day $hour:$minutes:$seconds"
date -d "$timestmp" "+%F %T" >> /dev/null