read localtime in format "hh:mm:ss.ms tt" (AM/PM postfix)
| 116 | |
| 117 | // read localtime in format "hh:mm:ss.ms tt" (AM/PM postfix) |
| 118 | bool USTimeConverter::ReadLocalTimeUSRegionMs(const std::string& text, FILETIME& ft) |
| 119 | { |
| 120 | std::istringstream is(text); |
| 121 | |
| 122 | WORD h, m, s, ms; |
| 123 | char c1, c2, p1, p2, d1; |
| 124 | if (!((is >> h >> c1 >> m >> c2 >> s >> d1 >> ms) && c1 == ':' && c2 == ':' && d1 == '.')) |
| 125 | return false; |
| 126 | if (h == 12) |
| 127 | h = 0; |
| 128 | |
| 129 | if (is >> p1 >> p2 && p1 == 'P' && p2 == 'M') |
| 130 | h += 12; |
| 131 | |
| 132 | ft = USTimeToFiletime(h, m, s, ms); |
| 133 | return true; |
| 134 | } |
| 135 | |
| 136 | } // namespace debugviewpp |
| 137 | } // namespace fusion |
no outgoing calls
no test coverage detected