[Qt-interest] QDateTime bug with <= operator ?
Thiago Macieira
thiago at kde.org
Wed Feb 10 10:12:41 CET 2010
Em Quarta-feira 10. Fevereiro 2010, às 10.05.44, Alexandre Beraud escreveu:
> Hi,
>
> QDateTime has milisecond precision (just like QTime). Can you check that
> those are equal too ?
Also check the timezone. If two dates have different time specifications
(universal or local), they have to be converted to universal for comparison.
> Merwin a écrit :
> > Hi,
> >
> > I got a really strange thing that happens:
> >
> > qDebug() << beginOfTheYear << beginDate << (beginOfTheYear <= beginDate);
> >
> > Outputs:
> >
> > QDateTime("*mer. févr. 10 09:42:01 2010*") QDateTime("*mer. févr. 10
> > 09:42:01 2010*") *false*
> >
> > As you can see, datetimes are equals, but the comparaison returns
> > false... Is there a reason or it's a bug?
> >
> > --
> > Merwin
> > _______________________________________________
> > Qt-interest mailing list
> > Qt-interest at trolltech.com
> > http://lists.trolltech.com/mailman/listinfo/qt-interest
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Senior Product Manager - Nokia, Qt Development Frameworks
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100210/23a28cd5/attachment.bin
More information about the Qt-interest-old
mailing list