Commit ee22c2f7 authored by bellard's avatar bellard

-localtime option


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@871 c046a42c-6fe2-441c-8c8c-71466251a162
parent be3edd95
......@@ -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);
......
......@@ -129,6 +129,7 @@ int vm_running;
int audio_enabled = 0;
int pci_enabled = 0;
int prep_enabled = 0;
int rtc_utc = 1;
/***********************************************************/
/* x86 ISA bus support */
......@@ -2015,6 +2016,7 @@ enum {
QEMU_OPTION_no_code_copy,
QEMU_OPTION_pci,
QEMU_OPTION_prep,
QEMU_OPTION_localtime,
};
typedef struct QEMUOption {
......@@ -2065,6 +2067,7 @@ const QEMUOption qemu_options[] = {
#ifdef TARGET_PPC
{ "prep", 0, QEMU_OPTION_prep },
#endif
{ "localtime", 0, QEMU_OPTION_localtime },
{ NULL },
};
......@@ -2341,6 +2344,9 @@ int main(int argc, char **argv)
case QEMU_OPTION_prep:
prep_enabled = 1;
break;
case QEMU_OPTION_localtime:
rtc_utc = 0;
break;
}
}
}
......
......@@ -170,6 +170,7 @@ void vm_stop(int reason);
extern int audio_enabled;
extern int ram_size;
extern int bios_size;
extern int rtc_utc;
/* XXX: make it dynamic */
#if defined (TARGET_PPC)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment