mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-09-17 17:58:09 +08:00
Merge pull request #117 from usefulcat/master
when parsing a local_time, parse up to 9 digits worth (nanoseconds) o…
This commit is contained in:
@@ -733,7 +733,13 @@ parse_local_time(location<Container>& loc)
|
||||
case 0: break;
|
||||
default: break;
|
||||
}
|
||||
if(sf.size() >= 6)
|
||||
if(sf.size() >= 9)
|
||||
{
|
||||
time.millisecond = from_string<std::uint16_t>(sf.substr(0, 3), 0u);
|
||||
time.microsecond = from_string<std::uint16_t>(sf.substr(3, 3), 0u);
|
||||
time.nanosecond = from_string<std::uint16_t>(sf.substr(6, 3), 0u);
|
||||
}
|
||||
else if(sf.size() >= 6)
|
||||
{
|
||||
time.millisecond = from_string<std::uint16_t>(sf.substr(0, 3), 0u);
|
||||
time.microsecond = from_string<std::uint16_t>(sf.substr(3, 3), 0u);
|
||||
|
Reference in New Issue
Block a user