ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/repos/HostStatus/Host.cpp
(Generate patch)

Comparing HostStatus/Host.cpp (file contents):
Revision 33 by Douglas Thrift, 2003-11-15T00:38:48-08:00 vs.
Revision 193 by Douglas Thrift, 2004-08-22T22:05:31-07:00

# Line 9 | Line 9
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 = mktime(&when);
14 <        
15 <        localtime_r(&time, &when);
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[45];
22 >        char then[61];
23  
24 <        strftime(then, 45, "%A %B %e, %Y %l:%M:%S %p %Z", &when);
24 >        strftime(then, 61, "%A, %B %e,&nbsp;%Y %l:%M:%S&nbsp;%p&nbsp;%Z", &when);
25  
26          this->since = then;
27   }
# Line 41 | Line 44 | ostream& operator<<(ostream& output, Hos
44   istream& operator>>(istream& input, Host& host)
45   {
46          bool done = false;
47 <        
47 >
48          do
49          {
50                  switch (input.peek())

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines