[Qt-interest] New Date and Time Features in Qt5?
David Ching
dc at dcsoft.com
Tue May 31 07:56:33 CEST 2011
-----Original Message-----
Date: Mon, 30 May 2011 20:42:38 +0300
From: Thiago Macieira <thiago at kde.org>
Subject: Re: [Qt-interest] New Date and Time Features in Qt5?
To: qt-interest at qt.nokia.com
Message-ID: <3176825.EuLPmoLkKI at doriath>
Content-Type: text/plain; charset="us-ascii"
On Monday, 30 de May de 2011 10:19:23 David Ching wrote:
> Are you writing an application that changes the system time and timezone
settings?
> If so, you need to go beyond Qt anyway, so I don't see this as a valid
use-case.
>
> If you're not writing the system configuration, then why do you need to
show the information?
I could be writing a UI that shows the user their time zone and whether or
not DST is in effect or not. When showing user the timezone, they expect to
always see the same one regardless of whether DST is in effect or not. For
example, I am in San Francisco, I expect to see Pacific Time as UTC-8, even
though currently DST is in effect, and thus current time is only 7 hours
behind UTC. I do not expect to see the UI show me UTC-7 in this case, which
is the only thing possible given the calculations that can currently be
performed with QDateTime.
I have another case where I need to query the current UTC time (current
QDateTime provides this OK) and also the offset in minutes of the local
timezone compared to UTC. This offset should not take into account DST (not
possible in Qt now). These two info is sent via serial port to FTDI chip on
a USB device to set its current time. It tracks DST itself and applies it,
that's why the offset I send should not include DST.
Thanks,
David
More information about the Qt-interest-old
mailing list