[Qt-interest] daylight saving vs QDateTime vs UTC offset
Thiago Macieira
thiago at kde.org
Sat Feb 27 22:45:06 CET 2010
Em Sábado 27. Fevereiro 2010, às 22.40.25, Imre Péntek escreveu:
> Hello!
>
> I wasn't able to tell the current localtime UTC offset at a time given as a
> QDateTime, also I believe there's no way to set QDateTime unambiguously
> other than the solution given in the example code (which would mean piping
> in real applications) to certain dates. In my case
> QDateTime(QDate(2009,10,25),QTime(2,59)) does not distinguish between these
> valid dates:
> 2009-10-25 02:59 CET
> 2009-10-25 02:59 CEST
>
> is there any way to deal with these problems?
Set the universal time instead.
QDateTime knows internally whether a given time is before the DST change or
after. But it's not exposed in the API.
--
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/20100227/0a5b9126/attachment.bin
More information about the Qt-interest-old
mailing list