WinCE - Setting System time C# or VB.NET

  • Hello,


    i tried to set the system time from code in my program (Windows CE on picomod 6). I used the functions SetSystemTime and GetSystemTime of coredll.dll. Date and time will changed in the actual session but if i make a reboot the old date/time is set.


    The same problem is if i use the windows date/time dialog!


    What is the problem? Is it nessassary to change also entries in the windows registry? Or is there a spezial API/DLL?


    Thanks for help.


    Regards,
    Alwin

  • Hello,


    you wrote:

    Quote

    Hello,


    i tried to set the system time from code in my program (Windows CE on picomod 6). I used the functions SetSystemTime and GetSystemTime of coredll.dll. Date and time will changed in the actual session but if i make a reboot the old date/time is set.


    The same problem is if i use the windows date/time dialog!


    So what do you mean by "old date/time"?
    And what do you mean by "But i can not change the time...:-("?


    It seems to work according your post but after reboot date/time "disapears", so i assume battery does not work!

  • Hello hpb,


    The RTC clock works fine but with a wrong date and wrong time. So i correct the date and time within my code (with SetSystemTime) in my program (or with the standard windows date/time dialog). Now the date and time ist correct.


    If i now reboot the system date time will set to the (old) values before i made my changes (+ N minutes for the time i need for changes and reboot).


    Regards,
    Alwin