Details
-
Bug
-
Resolution: Duplicate
-
Not Evaluated
-
None
-
6.7.3
-
None
-
Windows 10 Pro (10.0.19045 build 19045)
Description
On Windows:
1. Set the time zone to any with negative offset from UTC.
2. Run this code:
QDate dt;
dt = QDate::fromString("Oct 23 2024","MMM dd yyyy");
qDebug() << dt;
In debug mode:
~~~~~~~~~~
ASSERT: "maximum.date().toJulianDay() == 5373484" in file C:\Users\qt\work\qt\qtbase\src\corelib\time\qdatetimeparser.cpp, line 1617
Debug Error!
Program: C:\Qt\6.7.3\msvc2019_64\bin\Qt6Cored.dll
Module: 6.7.3
File: C:\Users\qt\work\qt\qtbase\src\corelib\time\qdatetimeparser.cpp
Line: 1617
ASSERT: "maximum.date().toJulianDay() == 5373484" in file C:\Users\qt\work\qt\qtbase\src\corelib\time\qdatetimeparser.cpp, line 1617
(Press Retry to debug the application)
~~~~~~~~~
Did not test in release mode, but looking at qdatetimeparser.cpp, Line 1617 - 1619, the result would be "invalid date"
According to the comment, there was an optimization.
The issue: At line 1493 "maximum" is incorrectly computed by getMaximum() function, where the return value utcMax is computed from localTimeMax.toUtc().
Did not look the sources in QT 6.7.2, but the example code works.
I did not find similar bug related to this function. Can't believe no one notice it. Maybe QAs are sleeping ?
Attachments
Issue Links
- duplicates
-
QTBUG-129448 ASSERT triggered in QDate::fromString
- Closed