From 1f73de74d2590f3dd9ae5d531905b6c339e92557 Mon Sep 17 00:00:00 2001 From: ollo Date: Sun, 15 May 2016 22:59:17 +0200 Subject: [PATCH] Updated code after executing new testscript --- timecore.lua | 2 +- unit/generateTimesMarchOctoberWithAllSeconds.sh | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/timecore.lua b/timecore.lua index 0e555e2..4acd92c 100644 --- a/timecore.lua +++ b/timecore.lua @@ -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 ) diff --git a/unit/generateTimesMarchOctoberWithAllSeconds.sh b/unit/generateTimesMarchOctoberWithAllSeconds.sh index af65b27..94a19bf 100755 --- a/unit/generateTimesMarchOctoberWithAllSeconds.sh +++ b/unit/generateTimesMarchOctoberWithAllSeconds.sh @@ -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