Bug in RISC OS Time/Date?

discuss general risc os software applications and utilities
Related forum: adventures


Post Reply
User avatar
BeebMaster
Posts: 3628
Joined: Sun Aug 02, 2009 5:59 pm
Location: Lost in the BeebVault!
Contact:

Bug in RISC OS Time/Date?

Post by BeebMaster » Wed Aug 12, 2020 10:33 pm

Every now and again my RISC PC gains a day. I put it down to possible deflating battery, and just change the date whenever I notice. Then I began to suspect something else when I restarted it after midnight and it gained a day. Immediately I thought it must be a problem with my boot bodge, which changes the date to 1/1/1997 so that VKiller will load, and then restores the date it's saved.

In fact it looks more like some kind of bug in RISC OS's SYS$ variables for the date. If the date is set whilst the time is between 12 midnight and 12.59am, then it will automatically add a day to the date:
scrn2.png
Is this a known bug? Can anything be done about it?

Maybe there was a bit in the rules that I missed that said don't feed it after midnight, as well as not spilling water or shining bright lights on it.
Image

Kazzie
Posts: 1793
Joined: Sun Oct 15, 2017 8:10 pm
Location: North Wales
Contact:

Re: Bug in RISC OS Time/Date?

Post by Kazzie » Thu Aug 13, 2020 6:33 am

Guessing here: Might it be related to the fact that it's currently BST?
BBC Model B 32K issue 7, Sidewise ROM board with 16K RAM
Archimedes 420/1 upgraded to 4MB RAM, ZIDEFS with 512MB CF card
RiscPC 600 under repair
Acorn System 1 home-made replica

User avatar
BeebMaster
Posts: 3628
Joined: Sun Aug 02, 2009 5:59 pm
Location: Lost in the BeebVault!
Contact:

Re: Bug in RISC OS Time/Date?

Post by BeebMaster » Thu Aug 13, 2020 10:48 am

I did try *CONFIGURE NODST but it didn't help. It still doesn't explain why it adds a whole 24 hours between midnight and 1am, that's some British Summer Time!! (Actually that is the average length of a British summer, spread over about 7 years).
Image

joachim
Posts: 181
Joined: Wed Jun 21, 2006 2:20 am
Location: Germany
Contact:

Re: Bug in RISC OS Time/Date?

Post by joachim » Thu Aug 13, 2020 1:28 pm

BeebMaster wrote:
Thu Aug 13, 2020 10:48 am
I did try *CONFIGURE NODST but it didn't help. It still doesn't explain why it adds a whole 24 hours between midnight and 1am, that's some British Summer Time!! (Actually that is the average length of a British summer, spread over about 7 years).
A timezone-related bug would cause exactly the effect you experienced, because between midnight and 1am the GMT date is different from the BST date. So the bug would be that the current time setting is 00:30 BST / 23:30 GMT, you type "Set Sys$Date Wed, 01 Jan" meaning to set the current datetime to 00:30 BST Wed, 01 Jan / 23:30 GMT Tue, 31 Dec, but instead the datetime gets set to 23:30 GMT Wed, 01 Jan / 00:30 BST Thu, 02 Jan.

The problem is caused by the timezone being different from +0000, so if "Configure NoDST" just changed the timezone setting to be +0100 all year round then it would not prevent the bug. However if you set the timezone to GMT and still see the bug then I have no explanation.

User avatar
BeebMaster
Posts: 3628
Joined: Sun Aug 02, 2009 5:59 pm
Location: Lost in the BeebVault!
Contact:

Re: Bug in RISC OS Time/Date?

Post by BeebMaster » Thu Aug 13, 2020 9:54 pm

I see what you mean, and more testing confirms that it does skip a day only when configured to BST.

But it still seems cockeyed to me, if I ask my OS the local date and time, and then want to make a change, I wouldn't expect it to start second guessing what the time is in some other territory and refuse to accept my input of what I want the date in my timezone to be.

I'm going to have to make a major hack to my date bodge now, so that it first checks the setting of the BST/GMT bit in the CMOS ram, then it checks the first two digits of the hour, and behaves differently depending on the results it finds.
Image

User avatar
SarahWalker
Posts: 1313
Joined: Fri Jan 14, 2005 3:56 pm
Contact:

Re: Bug in RISC OS Time/Date?

Post by SarahWalker » Thu Aug 13, 2020 10:23 pm

Possibly a daft question, but why are you loading !Killer at boot? Having it resident won't do anything, you only need the VProtect module loaded.

User avatar
BeebMaster
Posts: 3628
Joined: Sun Aug 02, 2009 5:59 pm
Location: Lost in the BeebVault!
Contact:

Re: Bug in RISC OS Time/Date?

Post by BeebMaster » Thu Aug 13, 2020 10:38 pm

I think I did it originally because of the problem with the date, and the only way I could get it running without an error message was to have an Obey file in the Boot sequence to bodge the date. As I remember, it won't let you alter its own !Boot or !Run files. I suppose as an alternative I could use the Obey file as its loader when I need it instead of clicking the application.
Image

User avatar
BeebMaster
Posts: 3628
Joined: Sun Aug 02, 2009 5:59 pm
Location: Lost in the BeebVault!
Contact:

Re: Bug in RISC OS Time/Date?

Post by BeebMaster » Fri Aug 14, 2020 4:50 pm

As it turned out, it wasn't anything like as much of a hack as I'd feared:
scrn0.png
Image

Post Reply

Return to “32-bit acorn software: other”