diff options
author | Javier S. Pedro <maemo@javispedro.com> | 2011-09-18 05:15:11 +0200 |
---|---|---|
committer | Javier S. Pedro <maemo@javispedro.com> | 2011-09-18 05:15:11 +0200 |
commit | 03af539d69d903dfb5df19b447707a35ebaa4a54 (patch) | |
tree | 11e5cdfacf3678e42efa4324653e5da479f92fc5 /metawatch | |
parent | 975189e29d80c07fadeb4d7a8654e25ca16a8db8 (diff) | |
download | sowatch-03af539d69d903dfb5df19b447707a35ebaa4a54.tar.gz sowatch-03af539d69d903dfb5df19b447707a35ebaa4a54.zip |
fixing day of the week issue
Diffstat (limited to 'metawatch')
-rw-r--r-- | metawatch/metawatch.cpp | 3 |
1 files changed, 2 insertions, 1 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(); |