[Qt-interest] QDateTime daylight saving parsing time offset

Dan White ygor at comcast.net
Wed Mar 30 15:35:20 CEST 2011


I believe you are mistaken.
This is not UTC.  The "+0100" refers to the first timezone to the east of Greenwich - Central European Time, I believe.

You may find this document useful: <http://www.w3.org/TR/NOTE-datetime.html>
and this reference: <http://en.wikipedia.org/wiki/ISO_8601>

You may also want to check out the QDateTime::fromString methods as the string you show is not in a standard format (like ISO 8601), but it can be parsed with QDateTime::fromString and an appropriate format string.  Link:<http://doc.qt.nokia.com/4.7/qdatetime.html#fromString>

“Sometimes I think the surest sign that intelligent life exists elsewhere in the universe is that none of it has tried to contact us.”
Bill Waterson (Calvin & Hobbes)

----- Paul Drummond <paul.drummond at iode.co.uk> wrote:
>I get a date time string in the following format:
> 
> Tue, 29 Mar 2011 09:00:00 +0100
> 
> Unless I'm mistaken (which happens a lot with me when working with
> date/time conversions!) the above string is in UTC format. When
> converted to a QDateTime the time should be 10:00:00, right?  Or have
> I got that completely wrong?  I hate date/time hacking :-(



More information about the Qt-interest-old mailing list