Important: Please read the Qt Code of Conduct -

QDateTime timezones

  • There is variable QDateTime dt, time is stored in it in UTC+0. It is necessary to receive value from this variable in some time zone (for example in Russian UTC+4).
    dt.setTimeSpec (Qt:: OffsetFromUTC) - works but in this case time depends by system options. For example if in system options an hour zone not UTC+4, and UTC+2 some, then value will be in UTC+2.
    I has read the qt-documentation but not found answer.

    Manually it is possible to do dt.addSecs (3600*Offset), but i think that there are internal features which allow transfer on winter/summertime.

  • Timezone support will be drastically improved in Qt 5. John Layt is working on this, and his code is already available to look at and play around with.

    Other than that, your post is very hard to read and understand to me. It seems like an automatic translation, and the actual question isn't clear. Might I suggest you try posting in Russian on the Russion forum section?

  • yes, sorry =) I am realy use an automatic translation, and I am really post original topic on russian section.
    It is very good news about timezones support in 5 version. I think it is necessary feature. Thanks for answer.

Log in to reply