there is one thing which i dont understand.
when you turn internet time sync on, swatch internet time is not received as a stupid 32 bit number of seconds (what a weird idea!) but as 1/1000 day.
so with a 1/1000 day clock you can express many thousands of years with a 32 bit float.
so i believe that it should be possible to get the right day and hour in 2041, too.
i am just not sure about minutes i.e. if the internal clock will be able to run when it is "full" and can count no more. (if that is what happens, one could on the one hand set the year value 100 years back so that the clock runs again - but that means otoh you are no longer able to update with internet time - until you hack either the internet time sync extension or the date and time cdev.)
Generally a hardware real time clock that reports an unsigned integer of any kind will just loop. It just keeps counting and incrementing it's value. When it's full it overflows back to 0 and just keeps going.
For the network time protocol that is used, it is a 64 bit number. One part is for the seconds and one is for fractions of a second (so that you can have synchronization between two devices that is very accurate). NTP also has a limit of of 137 years, but it's epoch is actually 1900, so if your using network time with a mac you'll actually start to have issues in 2036.
Change the epoch it uses to calculate the date. That will buy you 137 years. Trouble with that is than any system calls that do calculations that depend on the epoch date will need to be thoroughly tested for correctness.
This method that's what I first thought that can solve the issue... but actually we don't know what kind of side effects can have, and where to find the epoch data to be changed ...
The side effects of any change are unknown and would require extensive testing.
Finding the epoch is time consuming, but not all that difficult. I belive that while I was reading Inside Macintosh, it stated that the Operating system queries the real time clock once per second and updates the system date time. You can poke through the assembly code (thus the time consuming part) until you find that query and then look at the code around it to find the data section it compares the query results to, then epoch found.
I think the Date Time control panel set the real time clock as well. When you set a date in the control panel it calculates the number of seconds from the epoch and tells the real time clock to start counting from that number. So the control panel would also have info about where the epoch is stored. Who knows how many places it's located at though.
The other way is a little trickier. Add a counter stored on disk in say preference file or something, that counts the number of times the real time clock that provides the 32 bit value for calculating. You would have to detect the difference between a roll over and the pram just resetting, but you could put some rules in that guess at that with fairly descent accuracy.
Then you update/patch all call to get the seconds from epoch to accept a 64 bit unsigned int that would be the current 32 bit int value multiplied by the number of role overs that have occurred. In theory all other date/time function would remain the same so it wouldn't be as important to test them, but they sure should be.
Sorry, I don't fully understand this ... may be my low English skills ...
Yeah I just re-read that too. It doesn't make a whole lot of sense. Let me try again.
Update the Date Time calculations to check the RTC and a value stored on disc. This value would be the number of times the RTC has overflowed. (so it reached it's end and started at zero). Multiple the two numbers together, calculate the date based on that new number and bam, you actually won't really ever have to worry about the date time ever running out.