Rev 981 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | SVN | RSS feed
| Rev 981 | Rev 990 | ||
|---|---|---|---|
| Line 25... | Line 25... | ||
| 25 | string niceTime() |
25 | string niceTime() |
| 26 | { |
26 | { |
| 27 | string result; |
27 | string result; |
| 28 | struct tm tmStruct; |
28 | struct tm tmStruct; |
| 29 | time_t t = time(NULL); |
29 | time_t t = time(NULL); |
| 30 |
|
30 | localtime_r(&t, &tmStruct); |
| 31 | 31 | ||
| 32 | result += lpad(itos(tmStruct.tm_hour), 2, '0'); |
32 | result += lpad(itos(tmStruct.tm_hour), 2, '0'); |
| 33 | result += ":"; |
33 | result += ":"; |
| 34 | result += lpad(itos(tmStruct.tm_min), 2, '0'); |
34 | result += lpad(itos(tmStruct.tm_min), 2, '0'); |
| 35 | result += ":"; |
35 | result += ":"; |