31 |
|
return when; |
32 |
|
} |
33 |
|
|
34 |
+ |
ext::String Stamp::get8601() const |
35 |
+ |
{ |
36 |
+ |
char when[11]; |
37 |
+ |
|
38 |
+ |
std::strftime(when, 11, "%Y-%m-%d", &stamp); |
39 |
+ |
|
40 |
+ |
return when; |
41 |
+ |
} |
42 |
+ |
|
43 |
+ |
ext::String Stamp::getDate() const |
44 |
+ |
{ |
45 |
+ |
char date[11]; |
46 |
+ |
|
47 |
+ |
std::strftime(date, 11, "%m/%d/%Y", &stamp); |
48 |
+ |
|
49 |
+ |
return date; |
50 |
+ |
} |
51 |
+ |
|
52 |
+ |
ext::String Stamp::getTime() const |
53 |
+ |
{ |
54 |
+ |
char time[12]; |
55 |
+ |
|
56 |
+ |
std::strftime(time, 12, "%I:%M:%S %p", &stamp); |
57 |
+ |
|
58 |
+ |
return time; |
59 |
+ |
} |
60 |
+ |
|
61 |
|
void Stamp::setSeconds(int seconds) |
62 |
|
{ |
63 |
|
stamp.tm_sec = seconds; |
72 |
|
|
73 |
|
Stamp::operator ext::String() const |
74 |
|
{ |
75 |
< |
char when[20]; |
75 |
> |
char when[24]; |
76 |
|
|
77 |
< |
std::strftime(when, 20, "%F %T", &stamp); |
77 |
> |
std::strftime(when, 24, "%F %T GMT", &stamp); |
78 |
|
|
79 |
|
return when; |
80 |
|
} |