summaryrefslogtreecommitdiffstats
path: root/hw/pc.c
diff options
context:
space:
mode:
authorbellard2004-06-03 14:49:50 +0200
committerbellard2004-06-03 14:49:50 +0200
commitee22c2f7dbcc59d9b0c0c9e08fafc9c4759b37fc (patch)
tree18b2141958e7f3a974b645da8d62276e434f8bcc /hw/pc.c
parentupdate (diff)
downloadqemu-ee22c2f7dbcc59d9b0c0c9e08fafc9c4759b37fc.tar.gz
qemu-ee22c2f7dbcc59d9b0c0c9e08fafc9c4759b37fc.tar.xz
qemu-ee22c2f7dbcc59d9b0c0c9e08fafc9c4759b37fc.zip
-localtime option
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@871 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/pc.c')
-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);