Make DateTime::fromString() cope with 'T' separator
This commit is contained in:
parent
a116c9e790
commit
e6e7a63d6a
|
@ -93,7 +93,8 @@ DateTime DateTime::fromString(const char *str)
|
||||||
} else {
|
} else {
|
||||||
Detail::raiseAndAdd(*valueIndex, 10, c);
|
Detail::raiseAndAdd(*valueIndex, 10, c);
|
||||||
}
|
}
|
||||||
} else if ((c == '-' || c == ':' || c == '/') || (c == '.' && (valueIndex == secondsIndex)) || (c == ' ' && (valueIndex == dayIndex))) {
|
} else if ((c == '-' || c == ':' || c == '/') || (c == '.' && (valueIndex == secondsIndex))
|
||||||
|
|| ((c == ' ' || c == 'T') && (valueIndex == dayIndex))) {
|
||||||
if (++valueIndex == valuesEnd) {
|
if (++valueIndex == valuesEnd) {
|
||||||
break; // just ignore further values for now
|
break; // just ignore further values for now
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue