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 31 by Douglas Thrift, 2003-11-14T20:11:01-08:00 vs.
Revision 32 by Douglas Thrift, 2003-11-14T23:44:08-08:00

# Line 8 | Line 8
8  
9   void Host::setSince(const string& since)
10   {
11 <        //
11 >        struct tm when;
12 >        
13 >        strptime(since.c_str(), "%m/%d/%Y %H:%M:%S %Z", &when);
14 >
15 >        time_t time = mktime(&when);
16 >        
17 >        localtime_r(&time, &when);
18 >
19 >        char then[45];
20 >
21 >        strftime(then, 45, "%A %B %e, %Y %l:%M:%S %p %Z", &when);
22 >
23 >        this->since = then;
24   }
25  
26   ostream& operator<<(ostream& output, Host& host)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines