As has been observed multiple times, the DATE and TIME counters do not work in DOSBox and DOSBox-X. This is caused by gettimeofday() returning a tv.tv_sec value of -1 (actually UINT_MAX because time_t is unsigned for DJGPP). This results in the DATE and TIME counters being stuck at 2168-02-04 00:42:27. TIME_MILLIS, which uses tv.tv_usec, works as expected.
The upper half of the random seed is also initialized to -1. It is generated by calling time(NULL) directly.
Report ID | 857 | Title | gettimeofday() and time() return a UNIX timestamp of -1. |
Product | Archived MegaZeux Bugs | Status | Fixed (Severity 1 - Low) |
Version | 2.93 | Fixed in | 2.93b |
Introduced In Version | 2.93 | Operating System | DOS |
Page 1 of 1
Report ID #857: gettimeofday() and time() return a UNIX timestamp of -1.
#1 Lachesis
Posted 19 May 2024 - 07:27 PM
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"
xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
Page 1 of 1
Replies (1 - 2)
#2 Lachesis
Posted 19 May 2024 - 08:11 PM
Updating status to: Fixed
Issue fixed in: 2.93b
DJGPP requires the environment variable TZ to be initialized before it will return useful date/time values for no good reason. Fixed in GIT d3a251df by making MegaZeux set TZ if it is unset during platform init.
Issue fixed in: 2.93b
DJGPP requires the environment variable TZ to be initialized before it will return useful date/time values for no good reason. Fixed in GIT d3a251df by making MegaZeux set TZ if it is unset during platform init.
"Let's just say I'm a GOOD hacker, AND virus maker. I'm sure you wouldn't like to pay for another PC would you?"
xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
xx̊y (OST) - HELLQUEST (OST) - Zeux I: Labyrinth of Zeux (OST) (DOS OST)
w/ Lancer-X and/or asgromo: Pandora's Gate - Thanatos Insignia - no True(n) - For Elise OST
MegaZeux: Online Help File - Keycode Guide - Joystick Guide - Official GIT Repository
Page 1 of 1
0 User(s) are reading this issue
0 Guests and 0 Anonymous Users
Powered by IP.Tracker 1.3.2 © 2024 IPS, Inc.