aboutsummaryrefslogtreecommitdiffstats
path: root/hw/pl031.c
diff options
context:
space:
mode:
authoraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-04 21:34:52 +0000
committeraurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162>2008-12-04 21:34:52 +0000
commit0cd2df75a2d7223b567c0eaa2547ce6c7d6a83f7 (patch)
treeec1ea752936674862f150022b0c23eba9cc451f0 /hw/pl031.c
parentbb6834cfae238e342da966557d7d24423efe18ab (diff)
Fix RTC initial date computation
qemu_get_clock() returns a structure containing the time the user wants to be set (either UTC time, a local time, or a given date). Use mktimegm() instead of mktime() to convert it into POSIX time without taking the host timezone into account. Signed-off-by: Aurelien Jarno <aurelien@aurel32.net> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5878 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/pl031.c')
-rw-r--r--hw/pl031.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/hw/pl031.c b/hw/pl031.c
index cd8759faa..fb5f323cb 100644
--- a/hw/pl031.c
+++ b/hw/pl031.c
@@ -206,7 +206,7 @@ void pl031_init(uint32_t base, qemu_irq irq)
s->irq = irq;
/* ??? We assume vm_clock is zero at this point. */
qemu_get_timedate(&tm, 0);
- s->tick_offset = mktime(&tm);
+ s->tick_offset = mktimegm(&tm);
s->timer = qemu_new_timer(vm_clock, pl031_interrupt, s);
}