]>
git.karo-electronics.de Git - karo-tx-linux.git/commit
kvm tools: Fix reported year in RTC emulation
The gmtime() function returns the number of years since 1900.
On PCs, the "design" of CMOS dates is such that the years (in this case)
are years since 2000. Fix up RTC emulation as follows:
- if year is > 99, subtract 100
- if year is 99 (20th century) take it as it is
Signed-off-by: Ronald G. Minnich <rminnich@gmail.com>
[ penberg@kernel.org: cleanups ]
Signed-off-by: Pekka Enberg <penberg@kernel.org>