Post by TimHi,
CTime is problematic: the year range is highly restricitve, it has / had
bugs (VC6 - don't care any more, stopped using in years ago) - it has
apparently not been fixed in VS.Net either.
COleDatTime also had its problems due to being based on a floating point
value.
Anyway, the .NET CTime and other related classes use 64 bit integers
internally so there is no
longer a restrictive year range (that's in the new MFC DLL (MFC70.DLL)).
From:
http://msdn.microsoft.com/msdnnews/2001/sept/vcnet/vcnet.asp
64-bit Time and Date Functions
Your code may be safe from the Year 2000 bug, but did you know that the time
and date functions in the standard C runtime library will fail after
19:14:07 on January 18, 2038? The new 64-bit time and date functions can be
used to represent a date until midnight of December 31, 3000.
CTime and CTimeSpan have new methods to use 64-bit time/date values,
including CTimeSpan::GetDays64, CTimeSpan::GetTotalHours64,
CTimeSpan::GetHours64, CTimeSpan::Serialize64, CTime::GetTime64, and
CTime::Serialize64.
All these methods use the __int64 native compiler type. C runtime library
functions have also been updated to support 64-bit time/date: _ctime64,
_wctime64, _ftime64, _futime64, _gmtime64, _localtime64, _time64, _utime64,
_wutime64; _findfirst64, _wfindfirst64, _findnext64, _wfindnext64; and
_stat64, _wstat64.