aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
Diffstat (limited to 'hw')
-rw-r--r--hw/pc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/pc.c b/hw/pc.c
index 815d47fe57..eef120e0ee 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -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);