[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Y2K



On 09-Jan-00, Christian T. Steigies wrote:

>> Now is my question: Is this really a problem with hwclock? I do not think
>> so, but I am not any specialist of any sort so I can not say. Is it not
>> mktime() that will be confused to only see one digit in the year? I leave
>> this to you who knows better than me.
> Excellent deduction! From my fast reading over this, I can spot no errors
> and all sounds very reasonable. Im not an AOS expert, but I think you should
> post this to the new owners of Amiga or to c.s.a.programmers/hardware or
> something. Maybe somebody can make a new setclock for AmigaOS 3.1 

I think I need some more to come up with, or the people start to demand that 
I have to change it for them, you saw how thankful they are to you on this
list ;) 

> if hwclock recognized one digit years as valid years, everything would be
> fine as well?

Yes it might be OK. I have done some more research here it comes:

I have an A4000T and a Ricoh RP5c01A clock-chip, what I know is it the
same chip in A3000 and maybe A1200. The A2000 have not the same chip.
According to, Gene Heskett, is it a MSM-6242. So it maybe will not
behave the same on a A2000. 

This is what I get, when I have set the Chip with AOS "date" and then set 
it again with hwclock in Linux:                                         
                                                                        
 Invalid values in hardware clock:  0/01/10 07:19:45                    
 Not adjusting drift factor because the Hardware Clock previously       
 contained garbage.                                                     
                                                                        
It looks for me that mktime() can only read the lower value of the year,
because the year-value result is only "0" not "00". It also report that 
there is garbage. 

If I then run hwclock again then will I get following:                       
                                                                             
 Values in hardware clock: 100/01/10 07:20:04                                
                                                                             
Now is the year 100 (I have changed in the hwclock so it will not only show  
2 digits in the year). I know to little about C so it is hard for me to track
down where this 100 is coming from. If I change hwclock to printf %2d for the
tm.tm_year (that's how the program is written) then will the outcome be like 
this "Values in hardware clock: 00/01/10 07:20:04"
  
I suppose that's what we want it to be.                                                                                                  

> Maybe I will check that out, but perhaps you allready have a patch ready?

I should be very happy if I could have that knowledge so I could write
a Patch but I do not have this knowledge. Not yet ;) So I have to lean
on you and other that knows better than me. I just try to help with some
digging in the background.

> You do not by chance use this AOS programm from Geert which allows you run
> run your clock in GMT but still have correct local times? (I mentioned it in
> the install guide I think).

No I have not seen this program.


Thank you for your time
 
-->>> Aller <<<--



Reply to: