#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 159 of file xmlrpc.h.
| ISODate::ISODate | ( | ) |
Definition at line 44 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
}
| ISODate::ISODate | ( | const char * | s ) |
| long ISODate::diff | ( | const ISODate & | other ) | const |
Definition at line 139 of file xmlrpc.cpp.
References get_time_t().
Referenced by server_test().
{
time_t t1 = get_time_t(*this);
time_t t2 = get_time_t(other);
return difftime(t1, t2);
}


| string ISODate::str | ( | ) | const |
Definition at line 81 of file xmlrpc.cpp.
References _day, _hour, _minute, _month, _second, and _year.
Referenced by client_test(), XMLRPCCall::operator%(), and XMLRPCResponse::set_date().
{
char buffer[18];
sprintf(buffer, "%04d%02d%02dT%02d:%02d:%02d", _year, _month, _day, _hour, _minute, _second);
return buffer;
}

| int ISODate::_day |
Definition at line 169 of file xmlrpc.h.
Referenced by get_time_t(), ISODate(), and str().
| int ISODate::_hour |
Definition at line 171 of file xmlrpc.h.
Referenced by get_time_t(), ISODate(), and str().
| int ISODate::_minute |
Definition at line 172 of file xmlrpc.h.
Referenced by get_time_t(), ISODate(), and str().
| int ISODate::_month |
Definition at line 168 of file xmlrpc.h.
Referenced by get_time_t(), ISODate(), and str().
| int ISODate::_second |
Definition at line 173 of file xmlrpc.h.
Referenced by get_time_t(), ISODate(), and str().
| int ISODate::_year |
Definition at line 167 of file xmlrpc.h.
Referenced by get_time_t(), ISODate(), and str().
1.7.2