From 03af539d69d903dfb5df19b447707a35ebaa4a54 Mon Sep 17 00:00:00 2001 From: "Javier S. Pedro" Date: Sun, 18 Sep 2011 05:15:11 +0200 Subject: fixing day of the week issue --- metawatch/metawatch.cpp | 3 ++- sowatch.pro.user | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/metawatch/metawatch.cpp b/metawatch/metawatch.cpp index e6d8ea6..08b9890 100644 --- a/metawatch/metawatch.cpp +++ b/metawatch/metawatch.cpp @@ -178,7 +178,8 @@ void MetaWatch::setDateTime(const QDateTime &dateTime) msg.data[1] = date.year() & 0xFF; msg.data[2] = date.month(); msg.data[3] = date.day(); - msg.data[4] = date.dayOfWeek() - 1; + // Qt week starts on Monday([1-7]), MW starts on Sunday([0-6]). + msg.data[4] = date.dayOfWeek() % 7; msg.data[5] = time.hour(); msg.data[6] = time.minute(); msg.data[7] = time.second(); diff --git a/sowatch.pro.user b/sowatch.pro.user index d7bc3e6..7f97a16 100644 --- a/sowatch.pro.user +++ b/sowatch.pro.user @@ -1,6 +1,6 @@ - + ProjectExplorer.Project.ActiveTarget -- cgit v1.2.3