-localtime option

git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@871 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
bellard 2004-06-03 12:49:50 +00:00
parent be3edd9590
commit ee22c2f7db
3 changed files with 11 additions and 1 deletions

View file

@ -110,7 +110,10 @@ static void cmos_init(int ram_size, int boot_device)
/* set the CMOS date */
time(&ti);
tm = gmtime(&ti);
if (rtc_utc)
tm = gmtime(&ti);
else
tm = localtime(&ti);
rtc_set_date(s, tm);
val = to_bcd(s, (tm->tm_year / 100) + 19);