Microsoft KB Archive/117779

= INFO: Coordinated Universal Time on MS-DOS vs. Windows NT =

Article ID: 117779

Article Last Modified on 12/2/2003

-

APPLIES TO

 Microsoft Foundation Class Library 4.2, when used with:  Microsoft Visual C++ 1.0 Professional Edition

 Microsoft Visual C++ 1.5 Professional Edition

 Microsoft Visual C++ 1.51

 Microsoft Visual C++ 1.52 Professional Edition</li></ul>

 Microsoft Visual C++ 1.0 Professional Edition</li></ul>

 Microsoft Visual C++ 2.0 Professional Edition</li></ul>

 Microsoft Visual C++ 2.1</li></ul>

 Microsoft Visual C++ 4.0 Standard Edition</li></ul>

 Microsoft Visual C++ 4.1 Subscription</li></ul>

 Microsoft Visual C++ 4.2 Professional Edition</li></ul>

 Microsoft Visual C++ 5.0 Standard Edition</li></ul>

 Microsoft Visual C++ 6.0 Service Pack 5</li></ul>

<ul> <li>Microsoft Visual C++ 4.2 Enterprise Edition</li></ul>

<ul> <li>Microsoft Visual C++ 5.0 Enterprise Edition</li></ul>

<ul> <li>Microsoft Visual C++ 6.0 Enterprise Edition</li></ul>

<ul> <li>Microsoft Visual C++ 4.2 Professional Edition</li></ul>

<ul> <li>Microsoft Visual C++ 5.0 Professional Edition</li></ul>

<ul> <li>Microsoft Visual C++ 6.0 Professional Edition</li></ul>

<ul> <li>Microsoft Visual C++ 6.0 Standard Edition</li></ul>

<ul> <li>Microsoft Visual C++ .NET 2002 Standard Edition</li></ul> </li></ul>

-

<div class="notice_section">

This article was previously published under Q117779

<div class="summary_section">

SUMMARY
If a data file containing MFC CTime objects is moved from MS-DOS (including Windows) to Windows NT, or vice-versa, differences in the system time under MS-DOS and Windows NT can cause unexpected results.

<div class="moreinformation_section">

MORE INFORMATION
Under MS-DOS, Pacific Standard Time is the default time zone. The default time zone for Windows NT is Greenwich Mean Time. MFC CTime objects use Coordinated Universal Time (UTC) to store the current time. This can cause problems if CTime objects are shared between applications on default installations of MS-DOS (Windows) and Windows NT. Specifically, the time will be 8 hours off.

This is expected behavior for any object that uses UTC. To share data files, make sure that both systems use the same time zone. If you want to use an absolute time (one that remains the same regardless of time zone), you must implement your own object.

Additional query words: kbinf 1.00 1.50 1.51 1.52 2.00 2.10 2.50 2.51 2.52 3.00 3.10 4.00

Keywords: kbprb KB117779

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.