views:

220

answers:

1

HI,

Date in http header is represented according to RFC 822 (As Updated by RFC 1123), like Wed, 15 Jul 2009 12:16:22 GMT.

Able to represent in QDateTime using

QDateTime testDate = QDateTime::fromString("Wed, 15 Jul 2009 12:16:22","ddd, dd MMM yyyy HH:mm:ss");

but without the timezone, wants to represent server time in UTC. Is it possible to specify timezone and get the server time in UTC irrespective of its timezonein Qt?

-Suresh.

+1  A: 

You can't specify a particular timezone but you can say : ok I want to specify date and time in the current time zone of the machine. You can get the UTC by QDateTime::toUTC()...I mean convert the local time zone... But, I'm afraid you can't get the "GMT" by toString() pattern...

Matthieu

related questions