Details
-
Bug
-
Resolution: Invalid
-
P3: Somewhat important
-
None
-
5.9.7, 5.12.0
-
None
Description
When trying to convert from a string to a QDateTime, the returned value ends up being invalid for a span of 1 hour between 2 am and 3 am on daylight savings (March 10th 2019). As illustrated below:
QDateTime::fromString("2019-03-10 03:00:00", Qt::ISODate); // ok QDateTime::fromString("2019-03-10 01:59:59", Qt::ISODate); // ok QDateTime::fromString("2019-03-10 02:59:59", Qt::ISODate); // QDateTime(Invalid) QDateTime::fromString("2019-03-10 02:00:00", Qt::ISODate); // QDateTime(Invalid)
I am in the Eastern timezone (Canada). I believe there is a difference between US and Canada of when daylight savings actually starts which might be the cause of the issue. Canada appears to start at 3 am but the US starts at 2 amĀ (Eastern Time) - the exact range of time that is invalid.