diff options
author | Santiago Carot-Nemesio <sancane@gmail.com> | 2011-11-25 16:37:28 +0100 |
---|---|---|
committer | Johan Hedberg <johan.hedberg@intel.com> | 2011-12-08 14:36:55 +0200 |
commit | c569aca90c3815cb84619b308d3cff24a66a6870 (patch) | |
tree | 82a93781047ac11915a4d2191eca5f743ef2ad79 /thermometer | |
parent | 14803c4e4fafbce64b00e56926b0eb0092fdd12f (diff) | |
download | bluez-c569aca90c3815cb84619b308d3cff24a66a6870.tar.gz bluez-c569aca90c3815cb84619b308d3cff24a66a6870.tar.xz bluez-c569aca90c3815cb84619b308d3cff24a66a6870.zip |
thermometer: Fix bad epoch time stamp generation
The number of months is in the range 0 to 11, we have to decrease
month number by 1 before getting the epoch.
Diffstat (limited to 'thermometer')
-rw-r--r-- | thermometer/thermometer.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/thermometer/thermometer.c b/thermometer/thermometer.c index db33cdb2..e3872c9d 100644 --- a/thermometer/thermometer.c +++ b/thermometer/thermometer.c @@ -954,7 +954,7 @@ static void proc_measurement(struct thermometer *t, const uint8_t *pdu, } ts.tm_year = att_get_u16(&pdu[8]) - 1900; - ts.tm_mon = pdu[10]; + ts.tm_mon = pdu[10] - 1; ts.tm_mday = pdu[11]; ts.tm_hour = pdu[12]; ts.tm_min = pdu[13]; |