summaryrefslogtreecommitdiff
path: root/src/dev/sparc
diff options
context:
space:
mode:
authorAndreas Hansson <andreas.hansson@arm.com>2014-11-12 09:05:20 -0500
committerAndreas Hansson <andreas.hansson@arm.com>2014-11-12 09:05:20 -0500
commitcc336ecb5e36a7547cecab305692a93271e0e5b8 (patch)
tree12fc6a0b8a85dfbd34f7dd7eeb8c632508a4046b /src/dev/sparc
parent02b4605da0012a8b8f5008f9c9897b55cbf4aae9 (diff)
downloadgem5-cc336ecb5e36a7547cecab305692a93271e0e5b8.tar.xz
base: Revert 9277177eccff and use getenv/setenv for UTC time
This patch reverts changeset 9277177eccff which does not do what it was intended to do. In essence, we go back to implementing mkutctime much like the non-standard timegm extension.
Diffstat (limited to 'src/dev/sparc')
-rw-r--r--src/dev/sparc/dtod.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/dev/sparc/dtod.cc b/src/dev/sparc/dtod.cc
index 0d57b1f83..94a32bed4 100644
--- a/src/dev/sparc/dtod.cc
+++ b/src/dev/sparc/dtod.cc
@@ -53,8 +53,7 @@ DumbTOD::DumbTOD(const Params *p)
: BasicPioDevice(p, 0x08)
{
struct tm tm = p->time;
- time_t local = mktime(&tm);
- todTime = mktime(gmtime(&local));
+ todTime = mkutctime(&tm);
DPRINTFN("Real-time clock set to %s\n", asctime(&tm));
DPRINTFN("Real-time clock set to %d\n", todTime);