If you try to set the PC-systemtime with the function SetPLCTimeS, all was fine in year 2000 ... 2009.
But now in 2010, the date will be setted to 2000, it seems to be a problem with modulo division.
hi, can someone sent to my mail or a link with a libnodave.dll with the 2010 bug correct ? i am afraid ou correct it my self bacause something may be wrong... best regards
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
For the windows part this works:
nodave.c
5722c5722,5728
< ts[2]=daveToBCD(t1.wYear % 10);
---
> if (t1.wYear > 2000) {
> ts[1]=daveToBCD(20);
> ts[2]=daveToBCD((t1.wYear - 2000));
> } else {
> ts[1]=daveToBCD(19);
> ts[2]=daveToBCD((t1.wYear - 1900));
> }
The Linix part has to be fixed in the same way.
now it works fine, thanks to nobody !!!
I have no compiler available, would be very grateful if you could mail me the updated file or post on forum as attachment.
Thanks very much.
hi, can someone sent to my mail or a link with a libnodave.dll with the 2010 bug correct ? i am afraid ou correct it my self bacause something may be wrong... best regards