ISO8601d: Epoch strings are parsed without the same validation as other dates
This commit is contained in:
@@ -239,9 +239,8 @@ bool ISO8601d::parse (
|
||||
parse_date_ext (n) ||
|
||||
parse_time_utc_ext (n) ||
|
||||
parse_time_off_ext (n) ||
|
||||
parse_time_ext (n) ||
|
||||
parse_named (n) ||
|
||||
parse_epoch (n)) // Time last, as it is the most permissive.
|
||||
parse_time_ext (n) || // Time last, as it is the most permissive.
|
||||
parse_named (n))
|
||||
{
|
||||
// Check the values and determine time_t.
|
||||
if (validate ())
|
||||
@@ -254,6 +253,13 @@ bool ISO8601d::parse (
|
||||
}
|
||||
}
|
||||
|
||||
// ::parse_epoch doesn't require ::validate and ::resolve.
|
||||
else if (parse_epoch (n))
|
||||
{
|
||||
start = n.cursor ();
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user