read localtime in format "HH:mm:ss"
| 191 | |
| 192 | // read localtime in format "HH:mm:ss" |
| 193 | bool ReadLocalTime(const std::string& text, FILETIME& ft) |
| 194 | { |
| 195 | std::istringstream is(text); |
| 196 | WORD h, m, s; |
| 197 | char c1, c2; |
| 198 | if (!((is >> h >> c1 >> m >> c2 >> s) && c1 == ':' && c2 == ':')) |
| 199 | return false; |
| 200 | |
| 201 | SYSTEMTIME st = Win32::FileTimeToSystemTime(FILETIME()); |
| 202 | st.wHour = h; |
| 203 | st.wMinute = m; |
| 204 | st.wSecond = s; |
| 205 | st.wMilliseconds = 0; |
| 206 | ft = Win32::LocalFileTimeToFileTime(Win32::SystemTimeToFileTime(st)); |
| 207 | return true; |
| 208 | } |
| 209 | |
| 210 | std::istream& ReadLogFileMessage(std::istream& is, Line& line) |
| 211 | { |
no test coverage detected