[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] hvm: Correct RTC time offset update error due to tm->tm_year


In rtc_set_time, mktime is called to calculate seconds since 1970/01/01, input parameters of mktime are required to be in normal date format. Such as: year=1980, mon=12, day=31, hour=23, min=59, sec=59. However, the current input parameter of mktime is tm->tm_year, and it is the number of years since 1900. (For example, if current time is 2012/12/31, and tm->tm_year is 112). This is not suitable for requirement of mktime. So I think tm->tm_year should be changed to tm->tm_year+1900 when calling mktime. Please check the patch attached.


Attachment: rtc-timeoffset.patch
Description: Text document

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.