// Zoe AIM Away Message RSS Feed Generator // // Seth King and Douglas Thrift // // $Id$ #include "Stamp.hpp" Stamp::Stamp(const ext::String& when) { strptime(when.NullTerminate(), "%F %T", &stamp); timegm(&stamp); } Stamp::operator ext::String() const { char when[30]; std::strftime(when, 30, "%a, %d %b %Y %T GMT", &stamp); return when; } Stamp Stamp::operator+(int days) const { std::tm sum(stamp); sum.tm_mday += days; return timegm(&sum); }