diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-08-04 10:56:25 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-08-04 10:56:25 +0000 |
commit | 36cbaae5cc21fbd0a12fbb256e941c485bcf0ced (patch) | |
tree | 1ece4028c81ff7bf5a8315b7e22329fb96bbcb07 /hw/m48t59.c | |
parent | 327ac2e797ed57d7231d44c77a7473d62efe0989 (diff) |
Use UTC/localtime flag in M48Txx
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3111 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/m48t59.c')
-rw-r--r-- | hw/m48t59.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/hw/m48t59.c b/hw/m48t59.c index cda28c2f65..053acb5c06 100644 --- a/hw/m48t59.c +++ b/hw/m48t59.c @@ -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 } |