Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QDateTime timezones
Forum Updated to NodeBB v4.3 + New Features

QDateTime timezones

Scheduled Pinned Locked Moved General and Desktop
3 Posts 2 Posters 3.7k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    D Offline
    dartan
    wrote on last edited by
    #1

    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.

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      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?

      1 Reply Last reply
      0
      • D Offline
        D Offline
        dartan
        wrote on last edited by
        #3

        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.

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved