[Qt-interest] QDateTime, Qt::ISODate and Time Zones/Offsets
Bastian Bense
bastibense at gmail.com
Thu Jul 16 17:15:54 CEST 2009
Hello everyone,
for a network protocol parser I have to implement support for "complete" ISO
date/time specifications.
Here an example:
"2009-01-01T13:20:00+02:00"
This would indicate 13:20 (1:20 pm) in time zone +2h (Germany during summer
time) - so if you consider the offset, this would become 11:20 (11:20 am).
I tried to use QDateTime::fromString() using the Qt::ISODate type, but
unfortunately Qt does not seem to support ISO dates with an offset. For the
past hours I tried to write a work-around function to handle this, but this
seems to be more complex than I thought.
The code should run on Windows, Mac OS X and Linux, so native system calls
are probably not exactly what I'm looking for.
Did someone run into the same issue before? In my opinion time zones should
be parsed too, since QDateTime knows everything to turn it into a local time
afterwards.
Thanks!
--
Best regards,
Bastian Bense
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090716/d23ae3d8/attachment.html
More information about the Qt-interest-old
mailing list