Riwen Lu
66c5aa5726
rtc: cmos: Evaluate century appropriate
...
commit ff164ae39b82ee483b24579c8e22a13a8ce5bd04 upstream.
There's limiting the year to 2069. When setting the rtc year to 2070,
reading it returns 1970. Evaluate century starting from 19 to count the
correct year.
$ sudo date -s 20700106
Mon 06 Jan 2070 12:00:00 AM CST
$ sudo hwclock -w
$ sudo hwclock -r
1970-01-06 12:00:49.604968+08:00
Fixes: 2a4daadd4d3e5071 ("rtc: cmos: ignore bogus century byte")
Signed-off-by: Riwen Lu <luriwen@kylinos.cn>
Acked-by: Eric Wong <e@80x24.org>
Reviewed-by: Mateusz Jończyk <mat.jonczyk@o2.pl>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20220106084609.1223688-1-luriwen@kylinos.cn
Signed-off-by: Mateusz Jończyk <mat.jonczyk@o2.pl> # preparation for stable
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-08 18:24:34 +01:00
..
2019-08-20 21:44:45 +02:00
2019-04-04 10:07:08 +02:00
2019-04-04 10:07:08 +02:00
2019-12-17 19:56:52 +01:00
2021-09-26 14:07:14 +02:00
2019-04-06 15:05:31 +02:00
2019-08-23 16:20:50 +02:00
2019-04-04 10:07:08 +02:00
2021-07-20 16:10:51 +02:00
2019-08-21 09:57:23 +02:00
2020-04-23 10:36:31 +02:00
2019-04-11 16:42:55 +02:00
2019-05-30 11:29:22 -07:00
2019-04-04 10:07:08 +02:00
2019-08-21 09:57:23 +02:00
2019-03-18 03:36:01 +01:00
2019-08-21 09:57:23 +02:00
2019-08-21 09:57:23 +02:00
2019-05-30 11:26:37 -07:00
2019-08-13 10:53:10 +02:00
2019-08-21 09:57:23 +02:00
2019-08-13 10:53:10 +02:00
2019-05-30 11:26:32 -07:00
2019-08-13 10:53:10 +02:00
2020-01-26 10:01:06 +01:00
2019-06-19 17:09:55 +02:00
2019-05-21 10:50:45 +02:00
2020-01-17 19:49:03 +01:00
2019-08-21 09:57:23 +02:00
2022-01-27 09:19:27 +01:00
2019-04-08 14:40:12 +02:00
2018-09-28 14:20:59 +02:00
2019-05-30 11:26:41 -07:00
2019-09-02 11:33:42 +01:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-05-09 14:46:33 -07:00
2019-08-13 10:53:10 +02:00
2019-05-08 22:14:31 +02:00
2019-04-04 10:07:09 +02:00
2019-05-21 10:50:45 +02:00
2019-05-30 11:26:32 -07:00
2019-06-05 17:37:10 +02:00
2019-08-21 09:57:23 +02:00
2021-05-19 10:08:26 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2020-10-01 13:17:43 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-08-21 09:57:23 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-05-23 17:42:25 +02:00
2019-05-30 11:26:32 -07:00
2019-05-30 11:26:32 -07:00
2019-06-19 17:09:55 +02:00
2020-12-30 11:51:47 +01:00
2019-07-17 10:03:50 -07:00
2021-05-19 10:08:25 +02:00
2019-05-30 11:26:37 -07:00
2019-05-21 10:50:45 +02:00
2020-08-26 10:40:54 +02:00
2019-06-05 17:37:06 +02:00
2020-02-14 16:34:12 -05:00
2019-08-21 09:57:23 +02:00
2019-07-22 22:16:14 +02:00
2019-05-30 11:26:32 -07:00
2019-06-19 17:09:55 +02:00
2019-07-22 22:30:19 +02:00
2019-08-21 09:57:23 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:32 -07:00
2019-04-12 12:23:20 +02:00
2019-05-30 11:26:32 -07:00
2019-07-17 10:03:50 -07:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:32 -07:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2018-11-22 18:11:35 +01:00
2021-07-25 14:35:12 +02:00
2020-06-24 17:50:12 +02:00
2022-02-08 18:24:34 +01:00
2019-06-19 17:09:55 +02:00
2019-09-10 16:14:15 +02:00
2019-02-17 21:28:39 +01:00
2019-06-19 17:09:55 +02:00
2019-06-05 17:37:17 +02:00
2020-01-17 19:49:03 +01:00
2020-01-17 19:48:16 +01:00
2019-08-13 10:53:10 +02:00
2019-04-04 10:06:54 +02:00
2021-07-25 14:35:11 +02:00
2019-08-12 23:04:25 +02:00
2019-05-16 09:19:14 -07:00
2019-05-24 17:39:01 +02:00
2019-05-08 22:14:36 +02:00
2019-08-20 21:42:19 +02:00
2020-12-30 11:51:02 +01:00
2019-06-19 17:09:55 +02:00
2019-09-01 10:57:47 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:32 -07:00
2019-04-04 10:07:11 +02:00
2019-09-01 08:48:28 +02:00
2019-08-13 10:53:10 +02:00
2019-06-19 17:09:55 +02:00
2021-01-06 14:48:39 +01:00
2019-08-13 10:53:10 +02:00
2019-04-04 10:07:10 +02:00
2019-08-21 09:57:23 +02:00
2022-01-27 09:19:53 +01:00
2019-05-21 10:50:45 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:29:52 -07:00
2019-08-13 10:53:10 +02:00
2019-05-21 10:50:45 +02:00
2019-06-19 17:09:55 +02:00
2019-06-19 17:09:55 +02:00
2020-06-24 17:50:36 +02:00
2019-08-21 09:57:23 +02:00
2019-08-21 09:57:23 +02:00
2019-06-19 17:09:55 +02:00
2019-04-29 15:53:42 +02:00
2020-11-05 11:43:33 +01:00
2019-07-17 10:03:50 -07:00
2019-06-19 17:09:55 +02:00
2019-08-13 10:53:10 +02:00
2019-06-19 17:09:55 +02:00
2019-07-23 20:34:31 +02:00
2019-09-01 09:18:35 +02:00
2020-10-01 13:17:43 +02:00
2019-09-10 16:14:13 +02:00
2019-08-21 09:57:23 +02:00
2019-05-09 14:46:33 -07:00
2019-05-21 11:28:40 +02:00
2019-09-01 08:48:23 +02:00
2019-08-13 10:53:10 +02:00
2019-07-17 10:03:50 -07:00
2019-06-19 17:09:55 +02:00
2021-07-14 16:53:05 +02:00
2019-04-11 16:42:55 +02:00
2019-04-04 10:07:10 +02:00
2021-01-06 14:48:39 +01:00
2019-08-21 09:57:23 +02:00
2019-08-21 09:57:23 +02:00
2019-05-23 17:44:52 +02:00
2019-08-21 09:57:23 +02:00
2021-09-22 12:26:19 +02:00
2019-05-30 11:26:32 -07:00
2019-04-29 15:53:43 +02:00
2019-06-19 17:09:55 +02:00
2019-05-30 11:26:35 -07:00
2019-08-13 10:53:10 +02:00
2019-04-15 16:07:42 +02:00
2019-07-13 21:39:51 +02:00
2019-05-30 11:26:32 -07:00
2019-06-19 17:09:55 +02:00
2019-08-13 10:53:10 +02:00
2019-08-13 10:53:10 +02:00
2019-04-04 10:07:08 +02:00
2019-05-08 22:14:36 +02:00