下面是linux日期包装器,没有用到localtime_r,其实应该也没有什么关系。
Data.h
#ifndef _DATE_H_
#define _DATE_H_
#include <time.h>
class Date
{
protected:
time_t sysTime;
int year;
int month;
int day;
int hour;
int min;
int sec;
int week;
struct tm *localDate;
public:
Date();
Date(time_t value);
Date(
int year,
int month,
int day,
int hour = 0,
int min = 0,
int sec = 0);
public:
time_t getValue()
{
return sysTime;
}
public:
int getYear();
int getMont......
阅读全文