mirror of https://github.com/xqemu/xqemu.git
Use UTC/localtime flag in M48Txx
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3111 c046a42c-6fe2-441c-8c8c-71466251a162
This commit is contained in:
parent
327ac2e797
commit
36cbaae5cc
|
@ -80,6 +80,9 @@ static void get_time (m48t59_t *NVRAM, struct tm *tm)
|
|||
#ifdef _WIN32
|
||||
memcpy(tm,localtime(&t),sizeof(*tm));
|
||||
#else
|
||||
if (rtc_utc)
|
||||
gmtime_r (&t, tm);
|
||||
else
|
||||
localtime_r (&t, tm) ;
|
||||
#endif
|
||||
}
|
||||
|
@ -146,6 +149,9 @@ static void get_alarm (m48t59_t *NVRAM, struct tm *tm)
|
|||
#ifdef _WIN32
|
||||
memcpy(tm,localtime(&NVRAM->alarm),sizeof(*tm));
|
||||
#else
|
||||
if (rtc_utc)
|
||||
gmtime_r (&NVRAM->alarm, tm);
|
||||
else
|
||||
localtime_r (&NVRAM->alarm, tm);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue