Bug 246393 - QDateTime::fromString() calculate wrong day
Summary: QDateTime::fromString() calculate wrong day
Alias: None
Product: Fedora
Classification: Fedora
Component: qt   
(Show other bugs)
Version: 7
Hardware: All Linux
Target Milestone: ---
Assignee: Ngo Than
QA Contact: Fedora Extras Quality Assurance
Keywords: Patch
Depends On:
Blocks: 246024
TreeView+ depends on / blocked
Reported: 2007-07-01 17:44 UTC by Jochen Schmitt
Modified: 2008-05-14 15:42 UTC (History)
4 users (show)

Fixed In Version: 3.3.8b-1.fc7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-05-14 15:42:28 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Bug-fix (541 bytes, patch)
2007-07-22 12:19 UTC, Robert de Vries
no flags Details | Diff

Description Jochen Schmitt 2007-07-01 17:44:13 UTC
QDateTime::fromString() calculates wrong day when the day is more than 1 digit.

Can be reproduced with the following:

#include <qapplication.h>
#include <qdatetime.h>

int main(int argc, char *argv[])
    QApplication app(argc, argv);
    QDateTime time;
    time = time.fromString("Sat Mar 12 2007");

    qDebug("%d day", time.date().day());
    qDebug("%d month", time.date().month());
    qDebug("%d year", time.date().year());
    return 0;

This issue caused bug #24604 and is register in TrollTechs
Task Trackage datebase as ID #154433

Comment 1 Kevin Kofler 2007-07-11 04:24:45 UTC
The issue this causes in CrossVC is actually bug #246024 (without the typo).
Cervisia has the same bug, probably for the same reason.
CrossVC is getting a workaround, but I think this should really be patched in 
the Qt package.

Comment 2 Jochen Schmitt 2007-07-11 15:09:57 UTC
The upstream of CrossVC has create a workaround patch. A prerelease version of
CrossVC-1.5-2 which contains this patch can be find on rawhide.

Comment 3 Kevin Kofler 2007-07-11 15:12:29 UTC
I know, but this is a Qt bug and should really be fixed in Qt. And 
unfortunately we can't count on Trolltech to fix this because Qt 3 has been 
discontinued on July 1st.

CrossVC is also most likely not the only application affected, Cervisia appears 
to be hit by this too, at least judging from the symptoms, and there may be 

Comment 4 Jochen Schmitt 2007-07-11 20:01:39 UTC
Your right, I have reference to the Prerelease of CrossVC-1.5.2, because it may
be helpful to create a patch to solve the issue on Qt.

Comment 5 Robert de Vries 2007-07-22 12:19:15 UTC
Created attachment 159741 [details]

This patch fixes the bug by calculating the correct offset in the date string
where the day is located.

Comment 6 Jochen Schmitt 2007-07-22 20:22:05 UTC
I have tested the suggested bug fix.

It seems to works fine together with crossvc.

Comment 7 Jochen Schmitt 2007-08-07 19:55:41 UTC
Question: When we can expect the updated package?

Comment 8 Kevin Kofler 2007-10-05 21:42:44 UTC
Ping? Can we please get this fixed? While current CrossVC has a workaround, I 
believe this exact same Qt regression to also plague Cervisia (I see the same 
annoying symptoms as bug #246024 in Cervisia, and I haven't seen this with 
older Qt versions) and who knows what other programs are affected by this bug. 
A patch was provided 2.5 months ago. Than, can you please apply the patch?

Comment 9 Rex Dieter 2007-10-05 22:12:12 UTC
Anybody contact Trolltech about this (yet)?  If not, would be a good idea:

Comment 10 Kevin Kofler 2007-10-05 22:15:18 UTC
They have, as the bug report says: "is register in TrollTechs Task Trackage 
datebase as ID #154433". But this is Qt 3 and TrollTech isn't updating that 
anymore. I believe this bug is only in 3.3.8, older 3.3.x releases didn't have 
it, and Qt 4 probably doesn't either.

Comment 11 Kevin Kofler 2007-10-05 22:17:32 UTC
Upstream link (marked "won't fix"): 

Comment 12 Rex Dieter 2007-10-05 22:29:10 UTC
Fair 'nuf, maybe we can get into qt-copy then.

Comment 13 Bug Zapper 2008-05-14 13:22:26 UTC
This message is a reminder that Fedora 7 is nearing the end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 7. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '7'.

Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 7's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 7 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug. If you are unable to change the version, please add a comment here and someone will do it for you.

Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. If possible, it is recommended that you try the newest available Fedora distribution to see if your bug still exists.

Please read the Release Notes for the newest Fedora distribution to make sure it will meet your needs:

The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 14 Kevin Kofler 2008-05-14 15:42:28 UTC
Fixed months ago actually, in 3.3.8b.

Note You need to log in before you can comment on or make changes to this bug.