https://issues.dlang.org/show_bug.cgi?id=15655
Issue ID: 15655
Summary: SysTime.from*String incorrectly accept single digit
time zones and minutes > 59
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: [email protected]
Reporter: [email protected]
"+08" and "-08" would be valid for a time zone per ISO 8601, as should be
"+08:00" and "-08:00" for the extended format and "+0800" and "-0800" for the
non-extdended format. However, strings like "+8" or "-8" are not legal. It must
be +hhmm, -hhmm, +hh, or -hh for non-extended and +hh:mm, -hh:mm, +hh, or -hh
for extended. And currently, SysTime.from*String is not properly strict about
the time zone, allowing +h and -h when there are no minutes (even though it is
properly strict when there are minutes) and is not strict about the number of
digits in the minutes. In addition, it is not strict about whether the number
of minutes is actually valid (e.g. "+07:60" should not be valid).
--