11 DateTimeL(
short year,
short month,
short day,
short hour,
short minute,
short second,
short millisec = 0 );
21 short getDay()
const {
return _day; }
31 void setYear(
short year ) { _year = year; }
32 void setMonth(
short month ) { _month = month; }
33 void setDay(
short day ) { _day = day; }
34 void setHour(
short hour ) { _hour = hour; }
35 void setMinute(
short minute ) { _minute = minute; }
36 void setSecond(
short second ) { _second = second; }
39 ulong toUtcTime()
const;
40 uint64 toUtcTimeMs()
const;
46 DateTimeL & fromTm(
struct tm
const * t );
77 #endif // __TIME_HPP__ static ulong GetSecondsFromDays(int days)
本地日期时间。L意思'local',不包含时区信息
void setMonth(short month)
uint64 GetUtcTimeUs()
获取UTC时间微秒数,UTC秒数可以直接除以1000000,或者调用CRT的time(NULL)
short getDayOfYear() const
ulong GetUtcTime()
获取UTC时间秒数,或者调用CRT的time(NULL)
static ulong GetSecondsFromMinutes(int minutes)
uint64 GetUtcTimeMs()
获取UTC时间毫秒数,UTC秒数可以直接除以1000,或者调用CRT的time(NULL)
std::ostream & operator<<(std::ostream &o, ConsoleAttrT< _VarType > const &tr)
void setSecond(short second)
static ulong GetSecondsFromHours(int hours)
#define WINUX_FUNC_DECL(ret)
static ulong GetSecondsFromWeeks(int weeks)
short getMillisec() const
short getDayOfWeek() const
void setMillisec(short millisec)
unsigned long long uint64
void setMinute(short minute)
std::basic_string< tchar > String