QDateTimeEdit - time with timezone for PostgreSql
-
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
-
which Qt version do you use?
QTimeZome support was added with Qt 5.2 -
I'm using 5.2,
-
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 -
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.