9 |
|
void Host::setSince(const string& since) |
10 |
|
{ |
11 |
|
struct tm when; |
12 |
– |
|
13 |
– |
strptime(since.c_str(), "%m/%d/%Y %H:%M:%S %Z", &when); |
12 |
|
|
13 |
< |
time_t time = timegm(&when); |
14 |
< |
|
15 |
< |
memcpy(&when, localtime(&time), sizeof(struct tm)); |
13 |
> |
memset(&when, 0, sizeof(struct tm)); |
14 |
> |
|
15 |
> |
#ifndef __CYGWIN__ |
16 |
> |
strptime(since.c_str(), "%m/%d/%Y %H:%M:%S %Z", &when); |
17 |
> |
#else |
18 |
> |
strptime(since.c_str(), "%m/%d/%Y %H:%M:%S", &when); |
19 |
> |
#endif |
20 |
> |
mktime(&when); |
21 |
|
|
22 |
|
char then[61]; |
23 |
|
|
44 |
|
istream& operator>>(istream& input, Host& host) |
45 |
|
{ |
46 |
|
bool done = false; |
47 |
< |
|
47 |
> |
|
48 |
|
do |
49 |
|
{ |
50 |
|
switch (input.peek()) |