#include <xmlrpc.h>
Public Member Functions | |
ISODate () | |
ISODate (const char *s) | |
string | str () const |
long | diff (const ISODate &other) const |
Public Attributes | |
int | _year |
int | _month |
int | _day |
int | _hour |
int | _minute |
int | _second |
Definition at line 162 of file xmlrpc.h.
XMLRPC::ISODate::ISODate | ( | ) |
Definition at line 47 of file xmlrpc.cpp.
References _day, _hour, _minute, _month, _second, and _year.
{ #ifdef _WIN32 SYSTEMTIME time; GetLocalTime(&time); _year = time.wYear; _month = time.wMonth; _day = time.wDay; _hour = time.wHour; _minute = time.wMinute; _second = time.wSecond; #else time_t t; struct tm lc; time(&t); localtime_r(&t, &lc); _year = lc.tm_year + 1900; _month = lc.tm_mon + 1; _day = lc.tm_mday; _hour = lc.tm_hour; _minute = lc.tm_min; _second = lc.tm_sec; #endif }
XMLRPC::ISODate::ISODate | ( | const char * | s ) |
long XMLRPC::ISODate::diff | ( | const ISODate & | other ) | const |
Definition at line 142 of file xmlrpc.cpp.
References XMLRPC::get_time_t().
{ time_t t1 = get_time_t(*this); time_t t2 = get_time_t(other); return (long) difftime(t1, t2); }
string XMLRPC::ISODate::str | ( | ) | const |
Definition at line 84 of file xmlrpc.cpp.
References _day, _hour, _minute, _month, _second, and _year.
Referenced by XMLRPC::XMLRPCCall::operator%(), and XMLRPC::XMLRPCResponse::set_date().
{ char buffer[18]; sprintf(buffer, "%04d%02d%02dT%02d:%02d:%02d", _year, _month, _day, _hour, _minute, _second); return buffer; }
Definition at line 172 of file xmlrpc.h.
Referenced by XMLRPC::get_time_t(), ISODate(), and str().
Definition at line 174 of file xmlrpc.h.
Referenced by XMLRPC::get_time_t(), ISODate(), and str().
Definition at line 175 of file xmlrpc.h.
Referenced by XMLRPC::get_time_t(), ISODate(), and str().
Definition at line 171 of file xmlrpc.h.
Referenced by XMLRPC::get_time_t(), ISODate(), and str().
Definition at line 176 of file xmlrpc.h.
Referenced by XMLRPC::get_time_t(), ISODate(), and str().
Definition at line 170 of file xmlrpc.h.
Referenced by XMLRPC::get_time_t(), ISODate(), and str().