| 417 | } |
| 418 | |
| 419 | void LegacyTimePeriod::ProcessTimeRangeRaw(const String& timerange, const tm *reference, tm *begin, tm *end) |
| 420 | { |
| 421 | std::vector<String> times = timerange.Split("-"); |
| 422 | |
| 423 | if (times.size() != 2) |
| 424 | BOOST_THROW_EXCEPTION(std::invalid_argument("Invalid timerange: " + timerange)); |
| 425 | |
| 426 | ProcessTimeRaw(times[0], reference, begin); |
| 427 | ProcessTimeRaw(times[1], reference, end); |
| 428 | |
| 429 | if (begin->tm_hour * 3600 + begin->tm_min * 60 + begin->tm_sec >= |
| 430 | end->tm_hour * 3600 + end->tm_min * 60 + end->tm_sec) |
| 431 | end->tm_hour += 24; |
| 432 | } |
| 433 | |
| 434 | Dictionary::Ptr LegacyTimePeriod::ProcessTimeRange(const String& timestamp, const tm *reference) |
| 435 | { |
nothing calls this directly
no test coverage detected