38 ATLASSERT(lDays >= 0 && nHours >= 0 && nHours <= 23 && nMins >= 0 && nMins <= 59 && nSecs >= 0 && nSecs <= 59);
39 m_nSpan = ((((
LONGLONG)lDays) * 24 + nHours) * 60 + nMins) * 60 + nSecs;
143 CTime(
int nYear,
int nMonth,
int nDay,
int nHour,
int nMin,
int nSec,
int nDST = -1)
146 time.tm_year = nYear;
147 time.tm_mon = nMonth;
149 time.tm_hour = nHour;
152 time.tm_isdst = nDST;
169 time.tm_isdst = nDST;
182 time.tm_isdst = nDST;
197 time.tm_isdst = nDST;
209 time.tm_isdst = nDST;
277 dbts.year =
time.tm_year;
278 dbts.month =
time.tm_mon;
279 dbts.day =
time.tm_mday;
280 dbts.hour =
time.tm_hour;
281 dbts.minute =
time.tm_min;
282 dbts.second =
time.tm_sec;
291 st.wYear =
time.tm_year;
292 st.wMonth =
time.tm_mon;
293 st.wDayOfWeek =
time.tm_wday;
294 st.wDay =
time.tm_mday;
295 st.wHour =
time.tm_hour;
296 st.wMinute =
time.tm_min;
297 st.wSecond =
time.tm_sec;
298 st.wMilliseconds = 0;
606 return this->
GetTime() != ft.GetTime();
622 return this->
GetTime() < ft.GetTime();
627 return this->
GetTime() <= ft.GetTime();
645 return this->
GetTime() == ft.GetTime();
650 return this->
GetTime() > ft.GetTime();
655 return this->
GetTime() >= ft.GetTime();
void SetTimeSpan(LONGLONG nSpan) noexcept
bool operator>(CFileTimeSpan span) const noexcept
bool operator==(CFileTimeSpan span) const noexcept
CFileTimeSpan(LONGLONG nSpan) noexcept
CFileTimeSpan & operator=(const CFileTimeSpan &span) noexcept
CFileTimeSpan operator+(CFileTimeSpan span) const noexcept
CFileTimeSpan & operator-=(CFileTimeSpan span) noexcept
bool operator<(CFileTimeSpan span) const noexcept
bool operator<=(CFileTimeSpan span) const noexcept
CFileTimeSpan & operator+=(CFileTimeSpan span) noexcept
bool operator>=(CFileTimeSpan span) const noexcept
LONGLONG GetTimeSpan() const noexcept
bool operator!=(CFileTimeSpan span) const noexcept
CFileTimeSpan(const CFileTimeSpan &span) noexcept
CFileTimeSpan operator-(CFileTimeSpan span) const noexcept
bool operator<(CFileTime ft) const noexcept
bool operator<=(CFileTime ft) const noexcept
static const ULONGLONG Hour
CFileTime UTCToLocal() const noexcept
void SetTime(ULONGLONG nTime) noexcept
static const ULONGLONG Second
CFileTimeSpan operator-(CFileTime ft) const noexcept
bool operator>(CFileTime ft) const noexcept
CFileTime(const FILETIME &ft) noexcept
CFileTime LocalToUTC() const noexcept
CFileTime & operator-=(CFileTimeSpan span) noexcept
bool operator==(CFileTime ft) const noexcept
static CFileTime GetCurrentTime() noexcept
CFileTime operator-(CFileTimeSpan span) const noexcept
static const ULONGLONG Minute
static const ULONGLONG Day
ULONGLONG GetTime() const noexcept
CFileTime & operator=(const FILETIME &ft) noexcept
bool operator!=(CFileTime ft) const noexcept
CFileTime operator+(CFileTimeSpan span) const noexcept
CFileTime & operator+=(CFileTimeSpan span) noexcept
CFileTime(ULONGLONG nTime) noexcept
bool operator>=(CFileTime ft) const noexcept
static const ULONGLONG Millisecond
static const ULONGLONG Week
void ReleaseBuffer(_In_ int nNewLength=-1)
BOOL LoadString(_In_ UINT nID)
__time64_t GetTimeSpan() const noexcept
LONG GetMinutes() const noexcept
CString Format(UINT nID) const
LONG GetSeconds() const noexcept
LONGLONG GetTotalMinutes() const noexcept
CTimeSpan(__time64_t time) noexcept
LONGLONG GetTotalSeconds() const noexcept
CString Format(LPCTSTR pszFormat) const
CTimeSpan(LONG lDays, int nHours, int nMins, int nSecs) noexcept
LONGLONG GetDays() const noexcept
LONG GetHours() const noexcept
LONGLONG GetTotalHours() const noexcept
CString Format(LPCSTR pFormat) const
CTime(const DBTIMESTAMP &dbts, int nDST=-1) noexcept
bool operator!=(CTime time) const noexcept
struct tm * GetLocalTm(struct tm *ptm) const
CTimeSpan operator-(CTime time) const noexcept
CTime & operator+=(CTimeSpan span) noexcept
__time64_t GetTime() const noexcept
CTime & operator=(__time64_t time) noexcept
int GetDay() const noexcept
bool GetAsDBTIMESTAMP(DBTIMESTAMP &dbts) const noexcept
bool operator<(CTime time) const noexcept
CTime(int nYear, int nMonth, int nDay, int nHour, int nMin, int nSec, int nDST=-1)
bool operator<=(CTime time) const noexcept
int GetHour() const noexcept
CTime(const SYSTEMTIME &st, int nDST=-1) noexcept
bool operator>=(CTime time) const noexcept
struct tm * GetGmtTm(struct tm *ptm) const
int GetSecond() const noexcept
static CTime WINAPI GetCurrentTime() noexcept
CString FormatGmt(UINT nFormatID) const
int GetMonth() const noexcept
CTime(const FILETIME &ft, int nDST=-1)
CString Format(UINT nFormatID) const
CTime(WORD wDosDate, WORD wDosTime, int nDST=-1)
int GetMinute() const noexcept
CTime & operator-=(CTimeSpan span) noexcept
CString FormatGmt(LPCTSTR pszFormat) const
int GetDayOfWeek() const noexcept
bool operator==(CTime time) const noexcept
bool GetAsSystemTime(SYSTEMTIME &st) const noexcept
CTime operator+(CTimeSpan timeSpan) const noexcept
bool operator>(CTime time) const noexcept
CTime(__time64_t time) noexcept
CTime operator-(CTimeSpan timeSpan) const noexcept
CString Format(LPCTSTR pszFormat) const
VOID WINAPI GetSystemTimeAsFileTime(OUT PFILETIME lpFileTime)
BOOL WINAPI FileTimeToSystemTime(IN CONST FILETIME *lpFileTime, OUT LPSYSTEMTIME lpSystemTime)
BOOL WINAPI FileTimeToLocalFileTime(IN CONST FILETIME *lpFileTime, OUT LPFILETIME lpLocalFileTime)
BOOL WINAPI DosDateTimeToFileTime(IN WORD wFatDate, IN WORD wFatTime, OUT LPFILETIME lpFileTime)
BOOL WINAPI LocalFileTimeToFileTime(IN CONST FILETIME *lpLocalFileTime, OUT LPFILETIME lpFileTime)
GLenum GLenum GLvoid GLvoid GLvoid * span
_Check_return_opt_ _ACRTIMP __time64_t __cdecl _mktime64(_Inout_ struct tm *_Tm)
_Check_return_wat_ _ACRTIMP errno_t __cdecl _localtime64_s(_Out_ struct tm *_Tm, _In_ __time64_t const *_Time)
_Check_return_wat_ _ACRTIMP errno_t __cdecl _gmtime64_s(_Out_ struct tm *_Tm, _In_ __time64_t const *_Time)
_ACRTIMP __time64_t __cdecl _time64(_Out_opt_ __time64_t *_Time)
size_t CDECL strftime(char *str, size_t max, const char *format, const struct tm *mstm)
size_t CDECL wcsftime(wchar_t *str, size_t max, const wchar_t *format, const struct tm *mstm)