Skip to content

Commit d659645

Browse files
authored
handle any length of milliseconds
1 parent 8a0412f commit d659645

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/get_time.hpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ std::enable_if_t<std::is_base_of_v<std::tm, T>, T> constexpr get_time(
223223
parse_integer(hour_offset_str, 2, next);
224224
offset = hour_offset * 100 + min_offset;
225225
} else {
226-
if (date_str.size() - next > 4)
226+
if (date_str.size() - next > 4 + diff)
227227
throw std::invalid_argument(
228228
"value is not convertible!");
229229
offset = parse_integer(

0 commit comments

Comments
 (0)