[hatari-devel] GEMDOS bug: 5.10.2 Tgetdate off by one day, 5.10.3 Tgettime reports wrong time

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Two bugs, possibly related, in the real time clock emulation.

Background:

Debian stretch (9.6) as updated, on IA 64 architecture.

hatari hg default, changeset 7269:7e5cd2b03ab7, Sun Dec 16 13:31:19
2018 +0200 (v2.1.0 plus).

EmuTos 0.9.10, but also observed on 0.9.9, TOS 1.02 and 2.06.

Application: fastForth, a 68000 Forth which ran correctly on the Atari
ST 520 hardware.

The Forth application uses the current time and date in a number of
places. Due to a bug in TOS, it updates the time and date stamp on
files when it writes to them, making these data critical. A file
created in Forth and copied to a GEMDOS drive shows the incorrect time
and date indicated below.

Time and date are derived from two GEMDOS calls, 5.10.2 Tgetdate
and 5.10.3 Tgettime. http://toshyp.atari.org/en/00500a.html

Date is one day slow. I.e.: today is 24 December (Mountain, aka Denver,
in North America). The date reported is 23 December.

The time should be the local time. Instead it appears to be time since
the Hatari VM booted. E.g.: I booted the Hatari VM 30 minutes ago, so
the time shows as approximately 0:30:00. You can confirm this by
"rebooting' the VM (select "Reset Machine" in the Hatari main menu).

Also, the emuTOS boot splash screen reports the same incorrect time
(00:00:00) and date.

As a point of comparison, emuTOS 0.9.9 on xsteem 3.7.2, on the same
debian and i386 reports the correct time but the dates is off by more
than a year.

-- 
"When we talk of civilization, we are too apt to limit the meaning of
the word to its mere embellishments, such as arts and sciences; but
the true distinction between it and barbarism is, that the one
presents a state of society under the protection of just and
well-administered law, and the other is left to the chance government
of brute force."
- The Rev. James White, Eighteen Christian Centuries, 1889
Key fingerprint = CE5C 6645 A45A 64E4 94C0  809C FFF6 4C48 4ECD DFDB
https://charlescurley.com



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/