Welcome, Guest. Please login or register.

Author Topic: Date/Time on Amiga 4000 (OS 3.1.4) without battery-backed clock  (Read 3460 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline Orphan264Topic starter

My Amiga 4000 (D) does not have a battery for the time/date circuit. Normally I use RoadShow (TCP/IP) and an NTP client to update the date and time when the computer boots. However I have not had success using NetShutDown to terminate RoadShow after booting so I am exploring an alternate boot process that skips RoadShow and NTP.

What FILE/FOLDER does OS 3.1.4 use to determine the date/time if there is no battery?

I thought it might be the "most recent file on the boot volume" but that is not the case. I tried.

I want to be able to update this File/Folder with the current actual time/date and then reboot and the clock will get VERY CLOSE to the real time from this file.
 

guest11527

  • Guest
Re: Date/Time on Amiga 4000 (OS 3.1.4) without battery-backed clock
« Reply #1 on: March 12, 2019, 02:29:18 PM »
What FILE/FOLDER does OS 3.1.4 use to determine the date/time if there is no battery?
The date and time is then taken from the "last modified" date of the root directory of the boot volume, if the boot volume is an FFS volume. Or rather, the FFS sets the date and time to this date. What other file systems do is up to the file system.
 
The following users thanked this post: Orphan264

Offline Orphan264Topic starter

Re: Date/Time on Amiga 4000 (OS 3.1.4) without battery-backed clock
« Reply #2 on: March 12, 2019, 02:41:15 PM »
Thanks for the answer - I AM using FFS.

I am guessing that the "last modified" date of the root directory of my boot volume is not something that can be updated without re-creating it.  I will work on another way.

I appreciate the help!
 

guest11527

  • Guest
Re: Date/Time on Amiga 4000 (OS 3.1.4) without battery-backed clock
« Reply #3 on: March 12, 2019, 03:04:42 PM »
I am guessing that the "last modified" date of the root directory of my boot volume is not something that can be updated without re-creating it. 
Yes, of course. Just modify a file on the volume.
 

Offline Thomas

Re: Date/Time on Amiga 4000 (OS 3.1.4) without battery-backed clock
« Reply #4 on: March 12, 2019, 04:43:03 PM »
The date and time is then taken from the "last modified" date of the root directory of the boot volume, if the boot volume is an FFS volume. Or rather, the FFS sets the date and time to this date. What other file systems do is up to the file system.

There are multiple time stamps in the root block of the FFS volume. Unfortunately the system time is taken from the "disk altered" field rather than the "dir altered" field. This means that changing files in the root directory does not have any effect on the system time on next boot. The only way to update the system time is to relabel the volume.

 
The following users thanked this post: Orphan264

Offline Orphan264Topic starter

Re: Date/Time on Amiga 4000 (OS 3.1.4) without battery-backed clock
« Reply #5 on: March 12, 2019, 05:01:10 PM »
The only way to update the system time is to relabel the volume.

It seems you are correct. I tried modifying a file in the root directory of the volume and it did not work. :(

Don't think I will be relabeling my System: volume just to solve this problem. Thanks.
 

Offline kolla

Re: Date/Time on Amiga 4000 (OS 3.1.4) without battery-backed clock
« Reply #6 on: March 12, 2019, 05:15:09 PM »
Yes, of course. Just modify a file on the volume.

I believe I have explained to you at least three times that this does not work.

I also keep recommending http://aminet.net/package/util/time/TimeKeeper
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC
---
A3000/060CSPPC+CVPPC/128MB + 256MB BigRAM/Deneb USB
A4000/CS060/Mediator4000Di/Voodoo5/128MB
A1200/Blz1260/IndyAGA/192MB
A1200/Blz1260/64MB
A1200/Blz1230III/32MB
A1200/ACA1221
A600/V600v2/Subway USB
A600/Apollo630/32MB
A600/A6095
CD32/SX32/32MB/Plipbox
CD32/TF328
A500/V500v2
A500/MTec520
CDTV
MiSTer, MiST, FleaFPGAs and original Minimig
Peg1, SAM440 and Mac minis with MorphOS
 
The following users thanked this post: Orphan264

Offline Orphan264Topic starter

Re: Date/Time on Amiga 4000 (OS 3.1.4) without battery-backed clock
« Reply #7 on: March 12, 2019, 06:12:14 PM »
I also keep recommending http://aminet.net/package/util/time/TimeKeeper


Thanks for the recommendation, sounds like what I need.
 

Offline nbache

Re: Date/Time on Amiga 4000 (OS 3.1.4) without battery-backed clock
« Reply #8 on: March 12, 2019, 10:01:47 PM »
Just out of curiosity, why not just keep the network up and stay with the NTP syncing?

Best regards,

Niels
 

Offline kolla

Re: Date/Time on Amiga 4000 (OS 3.1.4) without battery-backed clock
« Reply #9 on: March 13, 2019, 07:07:45 AM »
The only way to update the system time is to relabel the volume.

Nope, also not enough.

It would be really useful with a tool that can list out and alter these filesystem date stamps.
« Last Edit: March 13, 2019, 07:09:21 AM by kolla »
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC
---
A3000/060CSPPC+CVPPC/128MB + 256MB BigRAM/Deneb USB
A4000/CS060/Mediator4000Di/Voodoo5/128MB
A1200/Blz1260/IndyAGA/192MB
A1200/Blz1260/64MB
A1200/Blz1230III/32MB
A1200/ACA1221
A600/V600v2/Subway USB
A600/Apollo630/32MB
A600/A6095
CD32/SX32/32MB/Plipbox
CD32/TF328
A500/V500v2
A500/MTec520
CDTV
MiSTer, MiST, FleaFPGAs and original Minimig
Peg1, SAM440 and Mac minis with MorphOS
 

Offline paul1981

Re: Date/Time on Amiga 4000 (OS 3.1.4) without battery-backed clock
« Reply #10 on: March 13, 2019, 10:57:13 AM »
Yes, of course. Just modify a file on the volume.

I believe I have explained to you at least three times that this does not work.

I also keep recommending http://aminet.net/package/util/time/TimeKeeper

I'm not sure that would be right as the OP's machine does have a clock presumably, but his battery is missing. If so, then it will remember the time between reboots anyway (if he sets it with setclock or time prefs first of course).
 

Offline Orphan264Topic starter

Re: Date/Time on Amiga 4000 (OS 3.1.4) without battery-backed clock
« Reply #11 on: March 13, 2019, 01:25:30 PM »
Just out of curiosity, why not just keep the network up and stay with the NTP syncing?

WHDLoad - Games don't work with the TCP/IP stack loaded. :(

I have tried using NetShutDown in the WHDLStartup script, but it never returns after being called - to me it seems the process gets locked.
 

Offline Orphan264Topic starter

Re: Date/Time on Amiga 4000 (OS 3.1.4) without battery-backed clock
« Reply #12 on: March 13, 2019, 01:27:50 PM »
I'm not sure that would be right as the OP's machine does have a clock presumably, but his battery is missing. If so, then it will remember the time between reboots anyway (if he sets it with setclock or time prefs first of course).


Perhaps it is more correct to say - the clock circuit does not work after being ruined by a leaky battery many years ago. Setclock fails on my machine.
 

Offline Thomas

Re: Date/Time on Amiga 4000 (OS 3.1.4) without battery-backed clock
« Reply #13 on: March 13, 2019, 02:00:13 PM »
I have tried using NetShutDown in the WHDLStartup script, but it never returns after being called - to me it seems the process gets locked.

NetShutdown requires that there are no active network connections. The network stack will automatically send Ctrl-C to all processes doing TCP/IP, but some might not respond to this signal. For example SMBFS does not quit if there are some files open on a network share.


Offline Orphan264Topic starter

Re: Date/Time on Amiga 4000 (OS 3.1.4) without battery-backed clock
« Reply #14 on: March 13, 2019, 04:17:33 PM »
NetShutdown requires that there are no active network connections.

Thanks, Thomas. I was already aware of this. However, even when I load no such TCP/IP processes, NetShutDown still does not work for me. :(