GetTimeZoneInformation return value

  • When I call GetTimeZoneInformation(), I get the return value 1, which means standard time. But we are now (24.08.2021) in daylight saving time.

    The standard name and the daylight name are correct.

    What could be the reason?


    I have configured CET "Central Europe Time". The date / time is valid.

  • Example:


    TIME_ZONE_INFORMATION tzLocal;

    memset(&tzLocal, 0, sizeof(tzLocal));

    int ret = GetTimeZoneInformation(&tzLocal);

    /*

    ret:

    0: TIME_ZONE_ID_UNKNOWN

    1: TIME_ZONE_ID_STANDARD

    2: TIME_ZONE_ID_DAYLIGHT

    */

    printf("ret: %d, '%d', std: '%s' '%d , day: '%s' '%d'"),

    ret,

    tzLocal.Bias,

    tzLocal.StandardName,

    tzLocal.StandardBias,

    tzLocal.DaylightName,

    tzLocal.DaylightBias);


    Result:

    ret: 1, '-60', std: 'Central Europe Standard Time' '0 , day: 'Central Europe Daylight Time' '-60'


    Why is the return value "ret" 1. We have now daylight saving time, so I would expect return value 2

  • We have some devices, where the return value is as expected "2"


    This is really strange.


    What could be the reason?

    Could there be something in the registry which is different?


    I have already checked the time zone setting in the registry for "Central Europe Standard Time". On all devices the same.

  • I can see the similar behavior, if I start the explorer.


    Set the date/time, daylight saving and timezone (GMT +1:00 Berlin).

    Via telnet I save that in the registry. With an application I fetch the local and system time.

    I expect an offset of 2h between local and system time, as we are now in daylight saving time.


    What is the reason, that the system does not recognize the daylight saving time?

  • Hello,


    did you checked the changelog for the vybrid kernel? Seems the problem was solved since kernel 2.2.

    If you use newer kernel can you compare registry (downloaded via Remote Registry Registor) between this kernel "we have some devices, where the return value is as expected "2"" and a not working one kernel? Maybe we got some hints.


    Thanks.

    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,


    you can click to roadmap/changelog then you got a html site shows you the information.

    The link is located under folder FSVybrid or WECx/WCEx at "MyF&S" (near where you downlad the kernel).

    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.