summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandre Belloni <alexandre.belloni@bootlin.com>2019-12-14 23:11:43 +0100
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2019-12-14 23:11:43 +0100
commitadb52851e348b281615bada08afb7e0d3e7748cf (patch)
treed971e12c88624c2ad9f3c433133ca220cfd5540d
parent7371cf7f3b39f97a54948647212e444fa3701fe2 (diff)
downloadrtc-tools-adb52851e348b281615bada08afb7e0d3e7748cf.tar.gz
rtc-range: add new cutoff date
BCD RTCs that have only 7 bits for the year will fail in 2080. Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
-rw-r--r--rtc-range.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/rtc-range.c b/rtc-range.c
index 5fc4273..a26c7fe 100644
--- a/rtc-range.c
+++ b/rtc-range.c
@@ -54,6 +54,12 @@ static struct {
.expected = { .tm_year = 170, .tm_mday = 1,
.tm_hour = 0, .tm_min = 0, .tm_sec = 0 }
},
+ { /* 2079 to 2080 */
+ .tm = { .tm_year = 179, .tm_mon = 11, .tm_mday = 31,
+ .tm_hour = 23, .tm_min = 59, .tm_sec = 59 },
+ .expected = { .tm_year = 180, .tm_mday = 1,
+ .tm_hour = 0, .tm_min = 0, .tm_sec = 0 }
+ },
{ /* 2099 to 2100 */
.tm = { .tm_year = 199, .tm_mon = 11, .tm_mday = 31,
.tm_hour = 23, .tm_min = 59, .tm_sec = 59 },