SetTimeZoneInformationByID and SetTimeZoneInformation failure RRS feed

  • Question

  •  Hello,

    we use Windows Embedded Compact 7  and iMX28 (ARM) BSP

    on start we have in debug :

    PID:00400002 TID:00510002 Unknown: DEBUGCHK failed in file d:\chelanrtm2\private\winceos\coreos\nk\k
    ernel\time.c at line 781
    PID:00400002 TID:00510002 DEBUG_BREAK @802a24ec Ignored.


    what we fail in function

    line 781:    VERIFY (BiasChangeHelper (&Bias, FALSE, FALSE));


    SetTimeZoneInformationByID and SetTimeZoneInformation returns zero, and GetLastError return 87 (ERROR_INVALID_PARAMETER).

    this functions call   SetTimeZoneBias()  that call BiasChangeHelper()

    and BiasChangeHelper  seems fail.


    any help?






    Monday, August 22, 2011 1:14 PM

All replies

  • Here's what I see on a Virtual PC OS image. The DEBUGCHK on BiasChangeHelper is inside InitSoftRTC: the function query the registry for a hex value "KTzBias" under [HKEY_LOCAL_MACHINE\init\BootVars] to init BIAS_STRUCT structure

    // for storing biases/putting bias information in registry
    typedef struct _BIAS_STRUCT {
     DWORD InDaylight;
     DWORD NormalBias;
     DWORD DaylightBias;

    If it does not find such value InitSoftRTC calls InitKTzBiasFromTzInfo to init BIAS_STRUCT. After all,  in both cases BiasChangeHelper is called.

    Looking at reginit.ini I have no "KTzBias" value but, after boot, I can see that it has been created:


    I imagine that, in my case InitKTzBiasFromTzInfo succeeds in initializing the BIAS_STRUCT - I suppose that the "KTzBias" value is created by InitKTzBiasFromTzInfo itself; maybe in your case InitKTzBiasFromTzInfo it's not able to initialize correctly the BIAS_STRUCT causing the  DEBUGCHK  in BiasChangeHelper.

    The only reference to InitKTzBiasFromTzInfo I can find in the code is:

    // sysgen-dependent function to init kernel tz bias if direcy query fails
    void InitKTzBiasFromTzInfo(PBIAS_STRUCT pBias);

    In my OS image I have SYSGEN_TIMEZONES=1 (it corresponds to Core OS Services -> Time Zone and DST Service -> Time Zone Support in the catalog): setting this variable will include timezones.reg in common.reg. The file includes information which -maybe- is needed in order to have InitKTzBiasFromTzInfo working. What about your OS? Do you have SYSGEN_TIMEZONES=1?

    Luca Calligaris lucaDOTcalligarisATeurotechDOTcom Check my blog:
    Tuesday, August 23, 2011 10:41 AM
  • Thank You very much! This is really help to us, i just add this key in my platform.reg [HKEY_LOCAL_MACHINE\init\BootVars] KTzBias =hex:01,00,00,00,E0,01,00,00,A4,01,00,00 and all fine now! BTW: if we use hive based registry - settimezone ok without this key, but with ram based registry this function fail. I think we need manually create [HKEY_LOCAL_MACHINE\init\BootVars] path in registry because this path not present in RAM based registry. B.R!
    • Edited by Anndd Tuesday, August 23, 2011 12:28 PM style
    Tuesday, August 23, 2011 12:25 PM