提交 36cbaae5 编写于 作者: B blueswir1

Use UTC/localtime flag in M48Txx


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3111 c046a42c-6fe2-441c-8c8c-71466251a162
上级 327ac2e7
......@@ -80,7 +80,10 @@ static void get_time (m48t59_t *NVRAM, struct tm *tm)
#ifdef _WIN32
memcpy(tm,localtime(&t),sizeof(*tm));
#else
localtime_r (&t, tm) ;
if (rtc_utc)
gmtime_r (&t, tm);
else
localtime_r (&t, tm) ;
#endif
}
......@@ -146,7 +149,10 @@ static void get_alarm (m48t59_t *NVRAM, struct tm *tm)
#ifdef _WIN32
memcpy(tm,localtime(&NVRAM->alarm),sizeof(*tm));
#else
localtime_r (&NVRAM->alarm, tm);
if (rtc_utc)
gmtime_r (&NVRAM->alarm, tm);
else
localtime_r (&NVRAM->alarm, tm);
#endif
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册