Wordclock/unit/timetest.lua

393 lines
16 KiB
Lua
Raw Normal View History

2016-04-12 20:38:35 +02:00
-- Simple unit test to test time zones
dofile("../timecore.lua")
function checkTime(yearIn, monthIn, dayIn, hourIn, minutesIn, secondsIn,dowIn, resultingHourDiff)
2016-04-12 21:02:56 +02:00
year, month, day, hour, minutes, seconds = getLocalTime(yearIn, monthIn, dayIn, hourIn, minutesIn, secondsIn, dowIn)
2016-04-12 20:38:35 +02:00
if not (year == yearIn and monthIn == month and day == dayIn and hour == (hourIn + resultingHourDiff) and minutesIn == minutes and secondsIn == seconds ) then
2016-04-12 21:02:56 +02:00
print(yearIn .. "-" .. string.format("%0.2d", monthIn) .. "-" .. string.format("%0.2d", dayIn) .. " " .. string.format("%0.2d", hourIn) .. ":" .. string.format("%0.2d", minutesIn) .. ":" .. string.format("%0.2d", secondsIn) .. " (" .. dowIn .. ".th dayOfWeek) not as expected GMT+" .. resultingHourDiff .. " but GMT+" .. (hour - hourIn) )
2016-04-12 20:38:35 +02:00
os.exit(1)
else
print(yearIn .. "-" .. string.format("%0.2d", monthIn) .. "-" .. string.format("%0.2d", dayIn) .. " " .. string.format("%0.2d", hourIn) .. ":" .. string.format("%0.2d", minutesIn) .. ":" .. string.format("%0.2d", secondsIn) .. " is GMT+" .. resultingHourDiff )
end
end
checkTime(2015, 1, 1, 10, 11, 12, 0, 1)
checkTime(2016, 1, 1, 13, 26, 50, 5, 1)
checkTime(2016, 1, 2, 2, 59, 39, 6, 1)
checkTime(2016, 1, 3, 3, 52, 8, 7, 1)
checkTime(2016, 1, 4, 14, 10, 51, 1, 1)
checkTime(2016, 1, 5, 22, 12, 21, 2, 1)
checkTime(2016, 1, 6, 21, 9, 34, 3, 1)
checkTime(2016, 1, 7, 0, 43, 57, 4, 1)
checkTime(2016, 1, 8, 0, 46, 55, 5, 1)
checkTime(2016, 1, 9, 19, 24, 23, 6, 1)
checkTime(2016, 1, 10, 21, 37, 17, 7, 1)
checkTime(2016, 1, 11, 8, 1, 9, 1, 1)
checkTime(2016, 1, 12, 13, 35, 51, 2, 1)
checkTime(2016, 1, 13, 23, 29, 47, 3, 1)
checkTime(2016, 1, 14, 14, 40, 7, 4, 1)
checkTime(2016, 1, 15, 1, 51, 52, 5, 1)
checkTime(2016, 1, 16, 11, 6, 45, 6, 1)
checkTime(2016, 1, 17, 5, 18, 12, 7, 1)
checkTime(2016, 1, 18, 22, 3, 38, 1, 1)
checkTime(2016, 1, 19, 15, 31, 12, 2, 1)
checkTime(2016, 1, 20, 23, 33, 51, 3, 1)
checkTime(2016, 1, 21, 9, 49, 23, 4, 1)
checkTime(2016, 1, 22, 17, 38, 13, 5, 1)
checkTime(2016, 1, 23, 0, 55, 54, 6, 1)
checkTime(2016, 1, 24, 0, 0, 22, 7, 1)
checkTime(2016, 1, 25, 11, 1, 56, 1, 1)
checkTime(2016, 1, 26, 6, 54, 34, 2, 1)
checkTime(2016, 1, 27, 5, 3, 6, 3, 1)
checkTime(2016, 1, 28, 22, 56, 37, 4, 1)
checkTime(2016, 1, 29, 16, 50, 25, 5, 1)
checkTime(2016, 1, 30, 22, 57, 17, 6, 1)
checkTime(2016, 1, 31, 5, 26, 27, 7, 1)
checkTime(2016, 2, 1, 7, 49, 15, 1, 1)
checkTime(2016, 2, 2, 19, 48, 0, 2, 1)
checkTime(2016, 2, 3, 11, 34, 10, 3, 1)
checkTime(2016, 2, 4, 22, 21, 18, 4, 1)
checkTime(2016, 2, 5, 18, 4, 20, 5, 1)
checkTime(2016, 2, 6, 0, 59, 7, 6, 1)
checkTime(2016, 2, 7, 17, 54, 16, 7, 1)
checkTime(2016, 2, 8, 20, 31, 15, 1, 1)
checkTime(2016, 2, 9, 20, 14, 56, 2, 1)
checkTime(2016, 2, 10, 23, 35, 16, 3, 1)
checkTime(2016, 2, 11, 8, 28, 49, 4, 1)
checkTime(2016, 2, 12, 22, 14, 45, 5, 1)
checkTime(2016, 2, 13, 4, 56, 0, 6, 1)
checkTime(2016, 2, 14, 20, 59, 40, 7, 1)
checkTime(2016, 2, 15, 9, 45, 3, 1, 1)
checkTime(2016, 2, 16, 4, 30, 45, 2, 1)
checkTime(2016, 2, 17, 4, 0, 38, 3, 1)
checkTime(2016, 2, 18, 18, 2, 50, 4, 1)
checkTime(2016, 2, 19, 10, 32, 0, 5, 1)
checkTime(2016, 2, 20, 8, 6, 38, 6, 1)
checkTime(2016, 2, 21, 13, 41, 8, 7, 1)
checkTime(2016, 2, 22, 16, 58, 44, 1, 1)
checkTime(2016, 2, 23, 18, 50, 47, 2, 1)
checkTime(2016, 2, 24, 1, 22, 42, 3, 1)
checkTime(2016, 2, 25, 7, 28, 33, 4, 1)
checkTime(2016, 2, 26, 17, 0, 36, 5, 1)
checkTime(2016, 2, 27, 23, 5, 7, 6, 1)
checkTime(2016, 2, 28, 11, 17, 56, 7, 1)
checkTime(2016, 2, 29, 9, 32, 7, 1, 1)
--Time 2016-2-30 21:54:44 is not valid
--Time 2016-2-31 11:58:38 is not valid
checkTime(2016, 3, 1, 1, 55, 3, 2, 1)
checkTime(2016, 3, 2, 4, 12, 31, 3, 1)
checkTime(2016, 3, 3, 17, 28, 32, 4, 1)
checkTime(2016, 3, 4, 20, 42, 43, 5, 1)
checkTime(2016, 3, 5, 18, 44, 56, 6, 1)
checkTime(2016, 3, 6, 0, 18, 15, 7, 1)
checkTime(2016, 3, 7, 3, 52, 56, 1, 1)
checkTime(2016, 3, 8, 17, 14, 23, 2, 1)
checkTime(2016, 3, 9, 13, 50, 4, 3, 1)
checkTime(2016, 3, 10, 22, 41, 12, 4, 1)
checkTime(2016, 3, 11, 12, 21, 7, 5, 1)
checkTime(2016, 3, 12, 4, 13, 47, 6, 1)
checkTime(2016, 3, 13, 14, 41, 55, 7, 1)
checkTime(2016, 3, 14, 17, 39, 12, 1, 1)
checkTime(2016, 3, 15, 22, 39, 24, 2, 1)
checkTime(2016, 3, 16, 16, 11, 57, 3, 1)
checkTime(2016, 3, 17, 18, 32, 10, 4, 1)
checkTime(2016, 3, 18, 21, 2, 56, 5, 1)
checkTime(2016, 3, 19, 6, 33, 10, 6, 1)
checkTime(2016, 3, 20, 3, 15, 54, 7, 1)
checkTime(2016, 3, 21, 6, 0, 24, 1, 1)
checkTime(2016, 3, 22, 5, 47, 25, 2, 1)
checkTime(2016, 3, 23, 17, 50, 34, 3, 1)
checkTime(2016, 3, 24, 3, 49, 53, 4, 1)
checkTime(2016, 3, 25, 0, 29, 39, 5, 1)
checkTime(2016, 3, 26, 0, 5, 53, 6, 1)
checkTime(2016, 3, 27, 9, 46, 40, 7, 2)
checkTime(2016, 3, 28, 13, 13, 2, 1, 2)
checkTime(2016, 3, 29, 20, 47, 37, 2, 2)
checkTime(2016, 3, 30, 6, 20, 38, 3, 2)
checkTime(2016, 3, 31, 10, 2, 56, 4, 2)
checkTime(2016, 4, 1, 13, 31, 2, 5, 2)
checkTime(2016, 4, 2, 15, 12, 26, 6, 2)
checkTime(2016, 4, 3, 13, 14, 28, 7, 2)
checkTime(2016, 4, 4, 16, 16, 54, 1, 2)
checkTime(2016, 4, 5, 19, 41, 7, 2, 2)
checkTime(2016, 4, 6, 7, 46, 56, 3, 2)
checkTime(2016, 4, 7, 2, 43, 19, 4, 2)
checkTime(2016, 4, 8, 9, 12, 14, 5, 2)
checkTime(2016, 4, 9, 7, 35, 5, 6, 2)
checkTime(2016, 4, 10, 7, 8, 34, 7, 2)
checkTime(2016, 4, 11, 15, 56, 2, 1, 2)
checkTime(2016, 4, 12, 4, 12, 31, 2, 2)
checkTime(2016, 4, 13, 1, 32, 45, 3, 2)
checkTime(2016, 4, 14, 11, 15, 17, 4, 2)
checkTime(2016, 4, 15, 14, 13, 1, 5, 2)
checkTime(2016, 4, 16, 23, 19, 50, 6, 2)
checkTime(2016, 4, 17, 6, 51, 57, 7, 2)
checkTime(2016, 4, 18, 11, 3, 57, 1, 2)
checkTime(2016, 4, 19, 5, 56, 4, 2, 2)
checkTime(2016, 4, 20, 12, 49, 19, 3, 2)
checkTime(2016, 4, 21, 6, 1, 5, 4, 2)
checkTime(2016, 4, 22, 11, 54, 35, 5, 2)
checkTime(2016, 4, 23, 13, 32, 3, 6, 2)
checkTime(2016, 4, 24, 16, 48, 11, 7, 2)
checkTime(2016, 4, 25, 3, 25, 30, 1, 2)
checkTime(2016, 4, 26, 2, 1, 35, 2, 2)
checkTime(2016, 4, 27, 1, 39, 1, 3, 2)
checkTime(2016, 4, 28, 11, 19, 2, 4, 2)
checkTime(2016, 4, 29, 7, 59, 48, 5, 2)
checkTime(2016, 4, 30, 1, 4, 30, 6, 2)
--Time 2016-4-31 0:44:48 is not valid
checkTime(2016, 5, 1, 11, 40, 39, 7, 2)
checkTime(2016, 5, 2, 12, 0, 40, 1, 2)
checkTime(2016, 5, 3, 16, 28, 27, 2, 2)
checkTime(2016, 5, 4, 17, 41, 30, 3, 2)
checkTime(2016, 5, 5, 1, 45, 47, 4, 2)
checkTime(2016, 5, 6, 5, 29, 16, 5, 2)
checkTime(2016, 5, 7, 6, 18, 5, 6, 2)
checkTime(2016, 5, 8, 8, 3, 19, 7, 2)
checkTime(2016, 5, 9, 17, 28, 40, 1, 2)
checkTime(2016, 5, 10, 0, 13, 4, 2, 2)
checkTime(2016, 5, 11, 17, 27, 42, 3, 2)
checkTime(2016, 5, 12, 4, 42, 13, 4, 2)
checkTime(2016, 5, 13, 12, 57, 23, 5, 2)
checkTime(2016, 5, 14, 23, 25, 34, 6, 2)
checkTime(2016, 5, 15, 23, 35, 45, 7, 2)
checkTime(2016, 5, 16, 12, 31, 47, 1, 2)
checkTime(2016, 5, 17, 15, 37, 49, 2, 2)
checkTime(2016, 5, 18, 12, 8, 22, 3, 2)
checkTime(2016, 5, 19, 15, 43, 39, 4, 2)
checkTime(2016, 5, 20, 21, 3, 39, 5, 2)
checkTime(2016, 5, 21, 1, 26, 26, 6, 2)
checkTime(2016, 5, 22, 13, 14, 25, 7, 2)
checkTime(2016, 5, 23, 4, 28, 24, 1, 2)
checkTime(2016, 5, 24, 2, 58, 16, 2, 2)
checkTime(2016, 5, 25, 8, 44, 14, 3, 2)
checkTime(2016, 5, 26, 18, 58, 1, 4, 2)
checkTime(2016, 5, 27, 19, 39, 53, 5, 2)
checkTime(2016, 5, 28, 9, 41, 52, 6, 2)
checkTime(2016, 5, 29, 8, 7, 31, 7, 2)
checkTime(2016, 5, 30, 6, 47, 35, 1, 2)
checkTime(2016, 5, 31, 9, 42, 17, 2, 2)
checkTime(2016, 6, 1, 17, 1, 21, 3, 2)
checkTime(2016, 6, 2, 0, 10, 33, 4, 2)
checkTime(2016, 6, 3, 5, 9, 6, 5, 2)
checkTime(2016, 6, 4, 4, 51, 17, 6, 2)
checkTime(2016, 6, 5, 3, 55, 21, 7, 2)
checkTime(2016, 6, 6, 20, 16, 14, 1, 2)
checkTime(2016, 6, 7, 13, 11, 52, 2, 2)
checkTime(2016, 6, 8, 16, 11, 4, 3, 2)
checkTime(2016, 6, 9, 12, 47, 14, 4, 2)
checkTime(2016, 6, 10, 23, 50, 43, 5, 2)
checkTime(2016, 6, 11, 17, 20, 0, 6, 2)
checkTime(2016, 6, 12, 23, 29, 38, 7, 2)
checkTime(2016, 6, 13, 9, 6, 46, 1, 2)
checkTime(2016, 6, 14, 12, 47, 20, 2, 2)
checkTime(2016, 6, 15, 16, 36, 24, 3, 2)
checkTime(2016, 6, 16, 15, 3, 57, 4, 2)
checkTime(2016, 6, 17, 8, 37, 0, 5, 2)
checkTime(2016, 6, 18, 14, 32, 14, 6, 2)
checkTime(2016, 6, 19, 21, 21, 31, 7, 2)
checkTime(2016, 6, 20, 1, 56, 52, 1, 2)
checkTime(2016, 6, 21, 13, 50, 29, 2, 2)
checkTime(2016, 6, 22, 19, 5, 43, 3, 2)
checkTime(2016, 6, 23, 9, 2, 57, 4, 2)
checkTime(2016, 6, 24, 16, 43, 17, 5, 2)
checkTime(2016, 6, 25, 12, 17, 22, 6, 2)
checkTime(2016, 6, 26, 12, 37, 2, 7, 2)
checkTime(2016, 6, 27, 11, 17, 43, 1, 2)
checkTime(2016, 6, 28, 19, 25, 3, 2, 2)
checkTime(2016, 6, 29, 23, 18, 2, 3, 2)
checkTime(2016, 6, 30, 5, 7, 57, 4, 2)
--Time 2016-6-31 23:2:13 is not valid
checkTime(2016, 7, 1, 3, 54, 33, 5, 2)
checkTime(2016, 7, 2, 6, 44, 27, 6, 2)
checkTime(2016, 7, 3, 23, 47, 28, 7, 2)
checkTime(2016, 7, 4, 9, 8, 56, 1, 2)
checkTime(2016, 7, 5, 22, 43, 39, 2, 2)
checkTime(2016, 7, 6, 15, 22, 9, 3, 2)
checkTime(2016, 7, 7, 17, 8, 1, 4, 2)
checkTime(2016, 7, 8, 2, 10, 20, 5, 2)
checkTime(2016, 7, 9, 13, 20, 47, 6, 2)
checkTime(2016, 7, 10, 8, 45, 29, 7, 2)
checkTime(2016, 7, 11, 21, 12, 12, 1, 2)
checkTime(2016, 7, 12, 23, 44, 44, 2, 2)
checkTime(2016, 7, 13, 19, 36, 47, 3, 2)
checkTime(2016, 7, 14, 14, 48, 14, 4, 2)
checkTime(2016, 7, 15, 18, 26, 23, 5, 2)
checkTime(2016, 7, 16, 2, 26, 54, 6, 2)
checkTime(2016, 7, 17, 3, 31, 17, 7, 2)
checkTime(2016, 7, 18, 4, 33, 22, 1, 2)
checkTime(2016, 7, 19, 8, 49, 47, 2, 2)
checkTime(2016, 7, 20, 16, 54, 21, 3, 2)
checkTime(2016, 7, 21, 6, 6, 2, 4, 2)
checkTime(2016, 7, 22, 18, 51, 55, 5, 2)
checkTime(2016, 7, 23, 21, 28, 18, 6, 2)
checkTime(2016, 7, 24, 23, 0, 16, 7, 2)
checkTime(2016, 7, 25, 21, 30, 58, 1, 2)
checkTime(2016, 7, 26, 5, 40, 6, 2, 2)
checkTime(2016, 7, 27, 9, 21, 20, 3, 2)
checkTime(2016, 7, 28, 23, 52, 50, 4, 2)
checkTime(2016, 7, 29, 13, 14, 36, 5, 2)
checkTime(2016, 7, 30, 22, 35, 12, 6, 2)
checkTime(2016, 7, 31, 3, 45, 5, 7, 2)
checkTime(2016, 8, 1, 9, 33, 5, 1, 2)
checkTime(2016, 8, 2, 6, 17, 41, 2, 2)
checkTime(2016, 8, 3, 22, 10, 52, 3, 2)
checkTime(2016, 8, 4, 22, 51, 1, 4, 2)
checkTime(2016, 8, 5, 12, 22, 35, 5, 2)
checkTime(2016, 8, 6, 2, 45, 21, 6, 2)
checkTime(2016, 8, 7, 20, 13, 3, 7, 2)
checkTime(2016, 8, 8, 9, 51, 46, 1, 2)
checkTime(2016, 8, 9, 10, 33, 43, 2, 2)
checkTime(2016, 8, 10, 2, 58, 43, 3, 2)
checkTime(2016, 8, 11, 5, 18, 7, 4, 2)
checkTime(2016, 8, 12, 10, 3, 14, 5, 2)
checkTime(2016, 8, 13, 16, 34, 28, 6, 2)
checkTime(2016, 8, 14, 20, 9, 26, 7, 2)
checkTime(2016, 8, 15, 11, 28, 18, 1, 2)
checkTime(2016, 8, 16, 12, 2, 13, 2, 2)
checkTime(2016, 8, 17, 22, 50, 18, 3, 2)
checkTime(2016, 8, 18, 17, 23, 39, 4, 2)
checkTime(2016, 8, 19, 2, 55, 54, 5, 2)
checkTime(2016, 8, 20, 4, 10, 25, 6, 2)
checkTime(2016, 8, 21, 3, 0, 23, 7, 2)
checkTime(2016, 8, 22, 11, 2, 3, 1, 2)
checkTime(2016, 8, 23, 12, 34, 59, 2, 2)
checkTime(2016, 8, 24, 17, 25, 30, 3, 2)
checkTime(2016, 8, 25, 9, 32, 39, 4, 2)
checkTime(2016, 8, 26, 9, 29, 0, 5, 2)
checkTime(2016, 8, 27, 15, 58, 43, 6, 2)
checkTime(2016, 8, 28, 19, 55, 55, 7, 2)
checkTime(2016, 8, 29, 9, 24, 27, 1, 2)
checkTime(2016, 8, 30, 21, 53, 29, 2, 2)
checkTime(2016, 8, 31, 23, 46, 9, 3, 2)
checkTime(2016, 9, 1, 2, 1, 2, 4, 2)
checkTime(2016, 9, 2, 4, 3, 51, 5, 2)
checkTime(2016, 9, 3, 22, 59, 30, 6, 2)
checkTime(2016, 9, 4, 21, 3, 0, 7, 2)
checkTime(2016, 9, 5, 4, 27, 35, 1, 2)
checkTime(2016, 9, 6, 9, 41, 47, 2, 2)
checkTime(2016, 9, 7, 14, 3, 39, 3, 2)
checkTime(2016, 9, 8, 3, 39, 42, 4, 2)
checkTime(2016, 9, 9, 10, 30, 46, 5, 2)
checkTime(2016, 9, 10, 19, 11, 18, 6, 2)
checkTime(2016, 9, 11, 4, 35, 26, 7, 2)
checkTime(2016, 9, 12, 6, 8, 44, 1, 2)
checkTime(2016, 9, 13, 3, 56, 14, 2, 2)
checkTime(2016, 9, 14, 0, 41, 37, 3, 2)
checkTime(2016, 9, 15, 13, 17, 31, 4, 2)
checkTime(2016, 9, 16, 23, 50, 13, 5, 2)
checkTime(2016, 9, 17, 4, 53, 56, 6, 2)
checkTime(2016, 9, 18, 1, 26, 25, 7, 2)
checkTime(2016, 9, 19, 18, 18, 42, 1, 2)
checkTime(2016, 9, 20, 15, 2, 54, 2, 2)
checkTime(2016, 9, 21, 3, 34, 4, 3, 2)
checkTime(2016, 9, 22, 5, 46, 47, 4, 2)
checkTime(2016, 9, 23, 20, 48, 19, 5, 2)
checkTime(2016, 9, 24, 5, 32, 28, 6, 2)
checkTime(2016, 9, 25, 10, 28, 29, 7, 2)
checkTime(2016, 9, 26, 21, 15, 0, 1, 2)
checkTime(2016, 9, 27, 3, 7, 28, 2, 2)
checkTime(2016, 9, 28, 0, 30, 30, 3, 2)
checkTime(2016, 9, 29, 22, 58, 41, 4, 2)
checkTime(2016, 9, 30, 11, 2, 20, 5, 2)
--Time 2016-9-31 8:5:31 is not valid
checkTime(2016, 10, 1, 14, 32, 43, 6, 2)
checkTime(2016, 10, 2, 12, 49, 59, 7, 2)
checkTime(2016, 10, 3, 17, 40, 37, 1, 2)
checkTime(2016, 10, 4, 18, 4, 59, 2, 2)
checkTime(2016, 10, 5, 23, 6, 52, 3, 2)
checkTime(2016, 10, 6, 23, 11, 9, 4, 2)
checkTime(2016, 10, 7, 0, 21, 22, 5, 2)
checkTime(2016, 10, 8, 7, 33, 4, 6, 2)
checkTime(2016, 10, 9, 4, 2, 9, 7, 2)
checkTime(2016, 10, 10, 6, 29, 17, 1, 2)
checkTime(2016, 10, 11, 16, 47, 50, 2, 2)
checkTime(2016, 10, 12, 1, 26, 56, 3, 2)
checkTime(2016, 10, 13, 5, 9, 54, 4, 2)
checkTime(2016, 10, 14, 2, 24, 35, 5, 2)
checkTime(2016, 10, 15, 18, 58, 38, 6, 2)
checkTime(2016, 10, 16, 3, 16, 29, 7, 2)
checkTime(2016, 10, 17, 9, 58, 18, 1, 2)
checkTime(2016, 10, 18, 15, 37, 44, 2, 2)
checkTime(2016, 10, 19, 3, 48, 12, 3, 2)
checkTime(2016, 10, 20, 4, 35, 1, 4, 2)
checkTime(2016, 10, 21, 22, 13, 5, 5, 2)
checkTime(2016, 10, 22, 16, 31, 20, 6, 2)
checkTime(2016, 10, 23, 18, 27, 15, 7, 2)
checkTime(2016, 10, 24, 12, 1, 39, 1, 2)
checkTime(2016, 10, 25, 0, 29, 16, 2, 2)
checkTime(2016, 10, 26, 17, 39, 41, 3, 2)
checkTime(2016, 10, 27, 16, 22, 37, 4, 2)
checkTime(2016, 10, 28, 9, 4, 14, 5, 2)
checkTime(2016, 10, 29, 14, 17, 53, 6, 2)
checkTime(2016, 10, 30, 4, 15, 10, 7, 1)
checkTime(2016, 10, 31, 11, 41, 20, 1, 1)
checkTime(2016, 11, 1, 20, 22, 33, 2, 1)
checkTime(2016, 11, 2, 9, 38, 3, 3, 1)
checkTime(2016, 11, 3, 12, 8, 28, 4, 1)
checkTime(2016, 11, 4, 14, 33, 55, 5, 1)
checkTime(2016, 11, 5, 8, 10, 14, 6, 1)
checkTime(2016, 11, 6, 23, 47, 42, 7, 1)
checkTime(2016, 11, 7, 1, 26, 20, 1, 1)
checkTime(2016, 11, 8, 0, 56, 56, 2, 1)
checkTime(2016, 11, 9, 10, 7, 14, 3, 1)
checkTime(2016, 11, 10, 12, 31, 8, 4, 1)
checkTime(2016, 11, 11, 18, 28, 2, 5, 1)
checkTime(2016, 11, 12, 19, 51, 8, 6, 1)
checkTime(2016, 11, 13, 11, 35, 6, 7, 1)
checkTime(2016, 11, 14, 15, 3, 46, 1, 1)
checkTime(2016, 11, 15, 7, 25, 17, 2, 1)
checkTime(2016, 11, 16, 20, 27, 15, 3, 1)
checkTime(2016, 11, 17, 8, 26, 32, 4, 1)
checkTime(2016, 11, 18, 17, 38, 58, 5, 1)
checkTime(2016, 11, 19, 23, 43, 31, 6, 1)
checkTime(2016, 11, 20, 19, 31, 19, 7, 1)
checkTime(2016, 11, 21, 9, 13, 51, 1, 1)
checkTime(2016, 11, 22, 19, 51, 59, 2, 1)
checkTime(2016, 11, 23, 13, 26, 43, 3, 1)
checkTime(2016, 11, 24, 5, 18, 46, 4, 1)
checkTime(2016, 11, 25, 1, 28, 25, 5, 1)
checkTime(2016, 11, 26, 23, 5, 17, 6, 1)
checkTime(2016, 11, 27, 12, 51, 25, 7, 1)
checkTime(2016, 11, 28, 9, 1, 27, 1, 1)
checkTime(2016, 11, 29, 1, 14, 9, 2, 1)
checkTime(2016, 11, 30, 4, 11, 31, 3, 1)
--Time 2016-11-31 22:42:42 is not valid
checkTime(2016, 12, 1, 15, 59, 48, 4, 1)
checkTime(2016, 12, 2, 21, 28, 35, 5, 1)
checkTime(2016, 12, 3, 4, 50, 45, 6, 1)
checkTime(2016, 12, 4, 7, 44, 18, 7, 1)
checkTime(2016, 12, 5, 22, 27, 12, 1, 1)
checkTime(2016, 12, 6, 0, 0, 1, 2, 1)
checkTime(2016, 12, 7, 23, 51, 19, 3, 1)
checkTime(2016, 12, 8, 23, 38, 20, 4, 1)
checkTime(2016, 12, 9, 19, 12, 16, 5, 1)
checkTime(2016, 12, 10, 2, 39, 52, 6, 1)
checkTime(2016, 12, 11, 12, 53, 16, 7, 1)
checkTime(2016, 12, 12, 13, 45, 26, 1, 1)
checkTime(2016, 12, 13, 21, 59, 15, 2, 1)
checkTime(2016, 12, 14, 0, 16, 24, 3, 1)
checkTime(2016, 12, 15, 18, 49, 29, 4, 1)
checkTime(2016, 12, 16, 2, 39, 11, 5, 1)
checkTime(2016, 12, 17, 13, 53, 14, 6, 1)
checkTime(2016, 12, 18, 5, 11, 18, 7, 1)
checkTime(2016, 12, 19, 23, 2, 4, 1, 1)
checkTime(2016, 12, 20, 6, 37, 22, 2, 1)
checkTime(2016, 12, 21, 4, 22, 58, 3, 1)
checkTime(2016, 12, 22, 18, 24, 51, 4, 1)
checkTime(2016, 12, 23, 4, 12, 20, 5, 1)
checkTime(2016, 12, 24, 7, 6, 57, 6, 1)
checkTime(2016, 12, 25, 6, 36, 30, 7, 1)
checkTime(2016, 12, 26, 18, 18, 39, 1, 1)
checkTime(2016, 12, 27, 14, 31, 19, 2, 1)
checkTime(2016, 12, 28, 18, 12, 11, 3, 1)
checkTime(2016, 12, 29, 11, 52, 27, 4, 1)
checkTime(2016, 12, 30, 14, 33, 18, 5, 1)
checkTime(2016, 12, 31, 15, 49, 12, 6, 1)
print "Finished with all tests"
os.exit(0)