1 |
douglas |
21 |
// Zoe AIM Away Message RSS Feed Generator |
2 |
|
|
// |
3 |
|
|
// Seth King and Douglas Thrift |
4 |
|
|
// |
5 |
|
|
// $Id$ |
6 |
|
|
|
7 |
|
|
#include "Stamp.hpp" |
8 |
|
|
|
9 |
douglas |
27 |
Stamp::Stamp(const ext::String& when) |
10 |
douglas |
21 |
{ |
11 |
douglas |
27 |
strptime(when.NullTerminate(), "%F %T", &stamp); |
12 |
douglas |
31 |
|
13 |
|
|
this->when = timegm(&stamp); |
14 |
douglas |
21 |
} |
15 |
|
|
|
16 |
douglas |
25 |
Stamp::operator ext::String() const |
17 |
douglas |
21 |
{ |
18 |
|
|
char when[30]; |
19 |
|
|
|
20 |
douglas |
24 |
std::strftime(when, 30, "%a, %d %b %Y %T GMT", &stamp); |
21 |
douglas |
21 |
|
22 |
|
|
return when; |
23 |
|
|
} |