int SaveStat(const USER_STAT & stat, const std::string & login, int year = 0, int month = 0) const;
};
-time_t ts2time_t(const IBPP::Timestamp & ts) const;
-void time_t2ts(time_t t, IBPP::Timestamp * ts) const;
-void ym2date(int year, int month, IBPP::Date * date) const;
+time_t ts2time_t(const IBPP::Timestamp & ts);
+void time_t2ts(time_t t, IBPP::Timestamp * ts);
+void ym2date(int year, int month, IBPP::Date * date);
#endif //FIREBIRD_STORE_H
#include "stg/ibpp.h"
//-----------------------------------------------------------------------------
-time_t ts2time_t(const IBPP::Timestamp & ts) const
+time_t ts2time_t(const IBPP::Timestamp & ts)
{
char buf[32];
int year, month, day, hour, min, sec;
return mktime(&time_tm);
}
//-----------------------------------------------------------------------------
-void time_t2ts(time_t t, IBPP::Timestamp * ts) const
+void time_t2ts(time_t t, IBPP::Timestamp * ts)
{
struct tm res;
*ts = IBPP::Timestamp(res.tm_year + 1900, res.tm_mon + 1, res.tm_mday, res.tm_hour, res.tm_min, res.tm_sec);
}
//-----------------------------------------------------------------------------
-void ym2date(int year, int month, IBPP::Date * date) const
+void ym2date(int year, int month, IBPP::Date * date)
{
date->SetDate(year + 1900, month + 1, 1);
date->EndOfMonth();