Solved How to use Date () with GMT Brazil (GMT - 03:00) ??
-
I'm using:
Timer {
interval: 500; running: true; repeat: true
onTriggered: date.text = Qt.formatDateTime(new Date(), "dd/MM/yyyy")}
-
What exactly is the issue here?
-
I want the time in GMT - 03:00 (Brazil) but the time comes in GMT - 00:00
-
@Mayron You have to set locale to do this:
Timer { property var locale: Qt.locale("br_BR") interval: 500; running: true; repeat: true onTriggered: date.text = new Date().toLocaleString(locale, "dd/MM/yyyy") }
-
@KroMignon thanks, this solves my problem