PRB: LocalFileTimeToFileTime may not Return Correct UTC Time

Last reviewed: January 30, 1998
Article ID: Q180104
The information in this article applies to:
  • Extended Messaging Application Programming Interface (MAPI), version 1.0

SYMPTOMS

The LocalFileTimeToFileTime() function in Mapi.dll may not return the correct time when the function is executed on a computer running Windows 95 or Windows NT.

CAUSE

The 16-bit version of the LocalFileTimeToFileTime function in Mapi.dll gets time zone information from the Win.ini file instead of the registry.

RESOLUTION

The time zone information is not written to the Win.ini file in Windows 95 or Windows NT. However, you may add the time zone information to the Win.ini file. The information to be added is at the following location in the registry:

   HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\TimeZoneInformation

You need to modify the Win.ini file by adding the following section:

   [MAPI 1.0 Time Zone]

The user needs to copy the values and data for each entry in the registry key listed above to a separate line into this section of the Win.ini. The end user should then have a Win.ini file that has the following section with similar data as shown below:

   [MAPI 1.0 Time Zone]
   Bias=12c
   StandardName=Eastern Standard Time
   StandardBias=0
   StandardStart=00000A00050002000000000000000000
   DaylightName=Eastern Daylight Time
   DaylightBias=ffffffc4
   DaylightStart=00000400010002000000000000000000
   ActiveTimeBias=12c

STATUS

This behavior is by design.

MORE INFORMATION

LocalFileTimeToFileTime() is used to convert a local file time to a file time based on the Coordinated Universal Time (UTC). The function uses the current computer settings for the time zone and daylight saving time.

Keywords          : EMAPI
Version           : WINDOWS:1.0
Platform          : WINDOWS
Issue type        : kbprb


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 30, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.