import QtQuick 2.0 import QtQuick.Controls 1.1 Rectangle { id: page width: 500; height: 200 function getTime() { Date.timeZoneUpdated() return Qt.formatDateTime(new Date(), Qt.DefaultLocaleLongDate) } Text { id: instructions anchors.topMargin: 50 width: parent.width text: "Change the system timezone and then click the button below twice. The first time the timezone updates and the second the time does. It should only take one." wrapMode: Text.WordWrap } Text { id: helloText anchors.top: instructions.bottom anchors.topMargin: 50 text: getTime() anchors.horizontalCenter: page.horizontalCenter } Button { text: "Update TZ" anchors.top: helloText.bottom anchors.topMargin: 50 anchors.horizontalCenter: page.horizontalCenter onClicked: helloText.text = getTime() } }