INFO: Coordinated Universal Time on MS-DOS vs. Windows NT (117779)
The information in this article applies to:
- The Microsoft Foundation Classes (MFC), when used with:
- Microsoft Visual C++ for Windows, 16-bit edition 1.0
- Microsoft Visual C++ for Windows, 16-bit edition 1.5
- Microsoft Visual C++ for Windows, 16-bit edition 1.51
- Microsoft Visual C++ for Windows, 16-bit edition 1.52
- Microsoft Visual C++, 32-bit Editions 1.0
- Microsoft Visual C++, 32-bit Editions 2.0
- Microsoft Visual C++, 32-bit Editions 2.1
- Microsoft Visual C++, 32-bit Editions 4.0
- Microsoft Visual C++, 32-bit Editions 4.1
- Microsoft Visual C++, 32-bit Editions 4.2
- Microsoft Visual C++, 32-bit Editions 5.0
- Microsoft Visual C++, 32-bit Editions 6.0
- Microsoft Visual C++, 32-bit Enterprise Edition 4.2
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 4.2
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
- Microsoft Visual C++ .NET (2002)
This article was previously published under Q117779 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.
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.
Modification Type: | Major | Last Reviewed: | 12/2/2003 |
---|
Keywords: | kbprb KB117779 |
---|
|