8 #include "daq/slc/base/Date.h"
14 Date::Date(time_t time)
19 Date::Date(
const Date& date)
34 m_tm = localtime(&m_time);
37 void Date::set(time_t time)
40 m_tm = localtime(&m_time);
43 int Date::getSecond()
const
48 int Date::getMinitue()
const
53 int Date::getHour()
const
58 int Date::getDay()
const
63 int Date::getMonth()
const
65 return m_tm->tm_mon + 1;
68 int Date::getYear()
const
70 return m_tm->tm_year + 1900;
73 const char* Date::toString(
const char* format)
const
75 memset(m_str, 0,
sizeof(m_str));
77 strftime(m_str, 31,
"%Y-%m-%d %H:%M:%S", m_tm);
79 strftime(m_str, 31, format, m_tm);
Abstract base class for different kinds of events.