8#include "daq/slc/base/Date.h"
14Date::Date(time_t time)
19Date::Date(
const Date& date)
34 m_tm = localtime(&m_time);
37void Date::set(time_t time)
40 m_tm = localtime(&m_time);
43int Date::getSecond()
const
48int Date::getMinitue()
const
53int Date::getHour()
const
58int Date::getDay()
const
63int Date::getMonth()
const
65 return m_tm->tm_mon + 1;
68int Date::getYear()
const
70 return m_tm->tm_year + 1900;
73const 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.