[Interest] Working with QDateTime's timezone information
Thiago Macieira
thiago.macieira at intel.com
Tue Jun 12 17:31:42 CEST 2012
On terça-feira, 12 de junho de 2012 16.26.08, Jan Kundrát wrote:
> I'd like to save them into a QDataStream for further retrieval and after
> loading them back, I'd love to show them both converted to the user's
> local time and also in the original format, including the original time
> zone information. I haven't found a way of doing this in Qt and would
> like to ask for help about that.
There isn't a way. The QTimezone feature has been pending for years.
> So, the questions:
>
> - Is there a publicly available way of doing what I want to do, ie. am I
> missing something?
No.
> - Does Qt5 change anything in this matter?
Not yet. Even QCalendaringSystem is still missing.
> - Would I hit any obstacle in Qt 4.7+ if I decied to use QDateTime's
> *internal* functions setUtcOffset() and utcOffset()? I see that I
> shouldn't be using them, but in this case it seems to me that they
> publish information which is only hardly available in other ways, so
> it's *so* tempting to just have a look at them.
You're entirely on your own if you touch the internals. Behaviour might change
in any release.
--
Thiago Macieira - thiago.macieira (AT) intel.com
Software Architect - Intel Open Source Technology Center
Intel Sweden AB - Registration Number: 556189-6027
Knarrarnäsgatan 15, 164 40 Kista, Stockholm, Sweden
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20120612/93c9dce8/attachment.sig>
More information about the Interest
mailing list