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