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. QDateTimeEdit - time with timezone for PostgreSql

QDateTimeEdit - time with timezone for PostgreSql

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 2.5k 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.
  • A Offline
    A Offline
    angelicaP
    wrote on last edited by
    #1

    hi,

    as described "here":http://qt-project.org/doc/qt-5/sql-types.html , time with time zone supported by PostgreSql are mapped by QDateTime.

    I would like to ask for some guideline: I'm interested to find an example to insert time with time zone in a QDateTimeEdit field as required in PSql. Although I read the Qt documentation, I'm not sure how to start.

    thanks

    1 Reply Last reply
    0
    • raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      which Qt version do you use?
      QTimeZome support was added with Qt 5.2

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      0
      • A Offline
        A Offline
        angelicaP
        wrote on last edited by
        #3

        I'm using 5.2,

        1 Reply Last reply
        0
        • raven-worxR Offline
          raven-worxR Offline
          raven-worx
          Moderators
          wrote on last edited by
          #4

          so since you are already using Qt 5.2, what does the QDateTime object contain any useful QTimeZone information?
          see "QDateTime::timeZone()":http://qt-project.org/doc/qt-5/qdatetime.html#timeZone

          --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
          If you have a question please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          0
          • A Offline
            A Offline
            angelicaP
            wrote on last edited by
            #5

            hi, I'm not sure if I understand your question.

            initially I was thinking to use the QTimeEdit to introduce the Time Zone, but I'm not sure how to use setTimeZone, or timeZone in my QTimeEdit field; than I was thinking it might be a posibility to use a QLineEdit to format it so I could introduce the data using the same syntax as in Postgresql, ie. 09:12:30+02 (+02 being UTC+2).

            any suggestion would be appreciated. at least where to start.

            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