summaryrefslogtreecommitdiffstats
path: root/examples/declarative/clocks/content
diff options
context:
space:
mode:
authorYann Bodson <yann.bodson@nokia.com>2009-10-30 03:55:07 (GMT)
committerYann Bodson <yann.bodson@nokia.com>2009-10-30 03:55:07 (GMT)
commitce2581dc8e77a9e1e27730a1b22257323a067d97 (patch)
tree2001275889f88ab017a9fef517f7783ade65fe50 /examples/declarative/clocks/content
parentf37e9d787bd418d8f75997a8d46c1c42e842c673 (diff)
downloadQt-ce2581dc8e77a9e1e27730a1b22257323a067d97.zip
Qt-ce2581dc8e77a9e1e27730a1b22257323a067d97.tar.gz
Qt-ce2581dc8e77a9e1e27730a1b22257323a067d97.tar.bz2
change cities in clock example
Diffstat (limited to 'examples/declarative/clocks/content')
-rw-r--r--examples/declarative/clocks/content/Clock.qml6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/declarative/clocks/content/Clock.qml b/examples/declarative/clocks/content/Clock.qml
index 636c99f..4e9984f 100644
--- a/examples/declarative/clocks/content/Clock.qml
+++ b/examples/declarative/clocks/content/Clock.qml
@@ -8,12 +8,12 @@ Item {
property var hours
property var minutes
property var seconds
- property int shift : 0
+ property var shift : 0
function timeChanged() {
var date = new Date;
- hours = date.getUTCHours() + clock.shift
- minutes = date.getUTCMinutes();
+ hours = date.getUTCHours() + Math.floor(clock.shift)
+ minutes = date.getUTCMinutes() + ((clock.shift % 1) * 60);
seconds = date.getUTCSeconds();
}