This is a very small and basic system extension for System 7 that I created a couple of years ago. When the INIT code is run at boot, it sets the datetime in the clock chip to 1st Jan 2000. It is intended for users who 1) don't use a PRAM battery in their old Macs and 2) may not be able to set the time over a network.
Solutions already previously existed for this problem, so I mainly did this as an exercise to learn what's involved in writing a system extension for Mac OS, and to better understand how to manipulate the datetime in Mac OS via code.
As the system thinks a valid datetime is set, it therefore won't display the "Your clock is not set to a correct date" warning alert dialog after system boot. One more annoyance gone!
Many thanks to @Phipli and @cheesestraws for suggesting the solution and @treellama for suggesting an appropriate name for it. Extra thanks to cheesestraws because the majority of the code in this system extension has been borrowed from his Force32 extension.
This has only been tested using System 7.1 in mini vMac on macOS 12.7 'Monterey' and on real hardware, a Macintosh Colour Classic running System 7.1. I don't know that it will work on other systems, but feel free to try.
The source code is also provided; it can be built with CodeWarrior Pro 4.
Solutions already previously existed for this problem, so I mainly did this as an exercise to learn what's involved in writing a system extension for Mac OS, and to better understand how to manipulate the datetime in Mac OS via code.
As the system thinks a valid datetime is set, it therefore won't display the "Your clock is not set to a correct date" warning alert dialog after system boot. One more annoyance gone!
Many thanks to @Phipli and @cheesestraws for suggesting the solution and @treellama for suggesting an appropriate name for it. Extra thanks to cheesestraws because the majority of the code in this system extension has been borrowed from his Force32 extension.
This has only been tested using System 7.1 in mini vMac on macOS 12.7 'Monterey' and on real hardware, a Macintosh Colour Classic running System 7.1. I don't know that it will work on other systems, but feel free to try.
The source code is also provided; it can be built with CodeWarrior Pro 4.



