VOGONS

Common searches


Strange TIME

Topic actions

First post, by ccc

User metadata
Rank Newbie
Rank
Newbie

Hi, I'm using a program written in Quick Basic.
The instruction TIME$ has these strange behaviors:
1. after midnight the time looks like this 24:10:15 (or 33:20:12 the next day)
2. the Time showed doesn't match with the time of Windows for example DOSBox time is 19:02:00 while Windows time is 19:07:22
Is it possible to fix this issue?

Reply 1 of 4, by Gene Wirchenko

User metadata
Rank Member
Rank
Member
ccc wrote:
Hi, I'm using a program written in Quick Basic. The instruction TIME$ has these strange behaviors: 1. after midnight the time lo […]
Show full quote

Hi, I'm using a program written in Quick Basic.
The instruction TIME$ has these strange behaviors:
1. after midnight the time looks like this 24:10:15 (or 33:20:12 the next day)
2. the Time showed doesn't match with the time of Windows for example DOSBox time is 19:02:00 while Windows time is 19:07:22
Is it possible to fix this issue?

IME, DOSBox is not too precise with time. This does not matter much to me because of how I use it which is not for games. I doubt gamers care much about this area. Translation: There is little chance this will be addressed.

Sincerely,

Gene Wirchenko

Reply 2 of 4, by Qbix

User metadata
Rank DOSBox Author
Rank
DOSBox Author

can you attach a minimal copy of a program that has these problems (like a simple quick basic program that only displays the time).

There are some fixes for problem 2, thought 1 was working as well

Water flows down the stream
How to ask questions the smart way!

Reply 3 of 4, by BinaryDemon

User metadata
Rank Oldbie
Rank
Oldbie

I can understand how this would be super low priority. I would suggest that if modifying DosBox to maintain the correct time is difficult then maybe add a command to refresh the time to match system time? Sort of like how rescan refreshes the directory structure.

Check out DOSBox Distro:

https://sites.google.com/site/dosboxdistro/ [*]

a lightweight Linux distro (tinycore) which boots off a usb flash drive and goes straight to DOSBox.

Make your dos retrogaming experience portable!

Reply 4 of 4, by ccc

User metadata
Rank Newbie
Rank
Newbie

Thank you for trying to help me.
i have shared a very simple program, written in quickbasic, to print the current time at the top left of the screen

this is the "4 instructions simple program":

DO
LOCATE 1, 1
PRINT TIME$
LOOP

After few minutes after launching the program, you will see the time showed in dosbox starts to be different from the time of Windows.
I would be glad to try any workaround you will suggest.

Attachments

  • Filename
    PRINTIME.zip
    File size
    12.64 KiB
    Downloads
    71 downloads
    File comment
    print the current time
    File license
    Fair use/fair dealing exception