The information in this article applies to:
SYMPTOMSThe following code returns an incorrect date when the time zone is set to a non-United States time, such as Singapore, Australia, Japan, or England:
This behavior occurs only on devices running Windows CE version 2.11. This behavior cannot be reproduced on the emulation or earlier versions of Windows CE 2.0 or 2.01.
CAUSEThe data type (time_t) of the wce_GetTZBias() function's parameter pTZBiasSecs is not correct. The date type (time_t) is defined as "unsigned long". However, *pTZBiasSec can be negative. For example, if Beijing time is GMT-8, *pTZBiasSec should be -8*60*60.
Thus, when the set time zone has a negative BiasSec, wce_GetTZBias returns a large number for pTZBiasSecs. Because it changed a negative int to an unsigned int, the wrong Date is returned for some time zones when calling CTime::GetCurrentTime or CTime::GetYear.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. MORE INFORMATIONSteps to Reproduce Behavior
REFERENCES© Microsoft Corporation 1999, All Rights Reserved. Additional query words: CTime, GetYear, GetTZBias, GetLocalTm, wce_GetTZBias
Keywords : kbMFC kbVC600bug kbVS600bug kbLocalization kbWinCE211 kbDSupport kbGrpMFCATL |
Last Reviewed: October 13, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |