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();
bool operator==(CFileTimeSpan span) const
bool operator<=(CFileTimeSpan span) const
CFileTimeSpan(const CFileTimeSpan &span)
CFileTimeSpan & operator+=(CFileTimeSpan span)
CFileTimeSpan & operator=(const CFileTimeSpan &span)
CFileTimeSpan operator-(CFileTimeSpan span) const
bool operator!=(CFileTimeSpan span) const
void SetTimeSpan(LONGLONG nSpan)
CFileTimeSpan operator+(CFileTimeSpan span) const
bool operator>=(CFileTimeSpan span) const
bool operator>(CFileTimeSpan span) const
bool operator<(CFileTimeSpan span) const
LONGLONG GetTimeSpan() const
CFileTimeSpan(LONGLONG nSpan)
CFileTimeSpan & operator-=(CFileTimeSpan span)
bool operator<(CFileTime ft) const
CFileTime(ULONGLONG nTime)
bool operator==(CFileTime ft) const
bool operator<=(CFileTime ft) const
static const ULONGLONG Hour
ULONGLONG GetTime() const
CFileTime & operator+=(CFileTimeSpan span)
static const ULONGLONG Second
CFileTime & operator=(const FILETIME &ft)
bool operator!=(CFileTime ft) const
CFileTime operator+(CFileTimeSpan span) const
CFileTime(const FILETIME &ft)
CFileTime operator-(CFileTimeSpan span) const
CFileTime UTCToLocal() const
static const ULONGLONG Minute
static const ULONGLONG Day
CFileTimeSpan operator-(CFileTime ft) const
static CFileTime GetCurrentTime()
bool operator>=(CFileTime ft) const
CFileTime LocalToUTC() const
void SetTime(ULONGLONG nTime)
CFileTime & operator-=(CFileTimeSpan span)
static const ULONGLONG Millisecond
bool operator>(CFileTime ft) const
static const ULONGLONG Week
void ReleaseBuffer(_In_ int nNewLength=-1)
BOOL LoadString(_In_ UINT nID)
LONGLONG GetTotalSeconds() const
CTimeSpan(__time64_t time)
CString Format(UINT nID) const
LONGLONG GetTotalMinutes() const
CString Format(LPCTSTR pszFormat) const
__time64_t GetTimeSpan() const
LONGLONG GetTotalHours() const
CTimeSpan(LONG lDays, int nHours, int nMins, int nSecs)
CString Format(LPCSTR pFormat) const
CTime operator+(CTimeSpan timeSpan) const
CTime operator-(CTimeSpan timeSpan) const
bool GetAsSystemTime(SYSTEMTIME &st) const
bool operator<=(CTime time) const
bool operator!=(CTime time) const
struct tm * GetLocalTm(struct tm *ptm) const
bool GetAsDBTIMESTAMP(DBTIMESTAMP &dbts) const
CTime & operator+=(CTimeSpan span)
CTime & operator-=(CTimeSpan span)
CTime(const SYSTEMTIME &st, int nDST=-1)
CTimeSpan operator-(CTime time) const
bool operator==(CTime time) const
CTime(int nYear, int nMonth, int nDay, int nHour, int nMin, int nSec, int nDST=-1)
bool operator>(CTime time) const
bool operator>=(CTime time) const
struct tm * GetGmtTm(struct tm *ptm) const
CString FormatGmt(UINT nFormatID) const
__time64_t GetTime() const
CTime(const FILETIME &ft, int nDST=-1)
CTime & operator=(__time64_t time)
CString Format(UINT nFormatID) const
CTime(WORD wDosDate, WORD wDosTime, int nDST=-1)
bool operator<(CTime time) const
CString FormatGmt(LPCTSTR pszFormat) const
static CTime WINAPI GetCurrentTime()
CTime(const DBTIMESTAMP &dbts, int nDST=-1)
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
errno_t _gmtime64_s(struct tm *ptm, const __time64_t *ptime)
__time64_t _mktime64(struct tm *ptm)
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)