16 explicit Second( time_t second ) : value(second)
31 DateTimeL(
short year,
short month,
short day,
short hour,
short minute,
short second,
short millisec = 0 );
41 short getDay()
const {
return _day; }
51 void setYear(
short year ) { _year = year; }
52 void setMonth(
short month ) { _month = month; }
53 void setDay(
short day ) { _day = day; }
54 void setHour(
short hour ) { _hour = hour; }
55 void setMinute(
short minute ) { _minute = minute; }
56 void setSecond(
short second ) { _second = second; }
59 time_t toUtcTime()
const;
60 uint64 toUtcTimeMs()
const;
66 DateTimeL & fromTm(
struct tm
const * t );
97 #endif // __TIME_HPP__ static ulong GetSecondsFromDays(int days)
本地日期时间。L意思'local',不包含时区信息
void setMonth(short month)
MilliSec(uint64 millisec)
short getDayOfYear() const
年第几日[1~366, 1=01-01]
static ulong GetSecondsFromMinutes(int minutes)
std::ostream & operator<<(std::ostream &o, ConsoleAttrT< _VarType > const &tr)
time_t GetUtcTime(void)
获取UTC时间秒数,或者调用CRT的time(NULL)
void setSecond(short second)
static ulong GetSecondsFromHours(int hours)
#define WINUX_FUNC_DECL(ret)
static ulong GetSecondsFromWeeks(int weeks)
uint64 GetUtcTimeMs(void)
获取UTC时间毫秒数,UTC秒数可以直接除以1000,或者调用CRT的time(NULL)
uint64 GetUtcTimeUs(void)
获取UTC时间微秒数,UTC秒数可以直接除以1000000,或者调用CRT的time(NULL)
short getMillisec() const
short getDayOfWeek() const
星期几[0~6, 0=Sunday]
void setMillisec(short millisec)
void setMinute(short minute)