SetLocalTime() vs. DaylightSavingTime

  • Hello,


    I would be grateful if you could provide a solution for the following problem soon:


    (1) Current date/time is 2012-02-18 15:44:00
    (2) I set date/time to 2012-09-18 15:44:00 using the API function SetLocalTime().
    (3) A subsequent call to GetLocalTime() returns 2012-09-18 16:44:xx - one hour forward.
    The same time is returned when I open a cmd window and enter "time".
    Current time zone setting is (GMT+01:00).
    The "Automatically adjust clock for daylight saving" option is selected in Settings=>Control Panel=>Date/Time.
    The corresponding registry value exists

    Code
    1. [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Clock]
    2. "AutoDST"=dword:1

    Kernel version is V-1.08.


    As you can see, the date for DaylightSavingTime activation (2012-03-25) is between the old and the new time stamp.


    This erroneous behaviour appears to be related to the failure in obeying the "Automatically adjust clock for daylight saving" setting
    which I had described in the thread "Automatically adjust clock for daylight saving" (without getting any reply for 6 months).


    Thank you in advance for any reply - even "no solution so far" would be better than nothing.


    Addendum: See <!-- m --><a class="postlink" href="http://blogs.msdn.com/b/cenet/archive/2006/04/27/daylight-savings-time-roll-overs-on-windows-ce.aspx">http://blogs.msdn.com/b/cenet/archive/2 ... ws-ce.aspx</a><!-- m -->
    Perhaps this issue is related to the WinCE kernel set-up and thus could be solved by F&S?

  • Hello,
    we have to check this. Mayby we can resolve the problem by install a QFE.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.

  • Hello,
    i find no patch about this subject. But follwing workaround may help: call "SetLocalTime" twice. First call do set DTS (if required), second call set correct time.

    F&S Elektronik Systeme GmbH
    As this is an international forum, please try to post in English.
    Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.