aboutsummaryrefslogtreecommitdiffstats
path: root/src/components/datetime/DateTimeController.h
diff options
context:
space:
mode:
authoruli <cybuzuma@vnxs.de>2022-11-23 12:41:28 +0100
committerJF <JF002@users.noreply.github.com>2022-11-25 20:14:26 +0100
commit02116a2fd41518c779decdd8acc2e4c80e358425 (patch)
tree704a9710b8baec462e019e0de7e5d216f21a33bf /src/components/datetime/DateTimeController.h
parentf1d2a8ee50fe298357c5b2aebd5196d6f84805c7 (diff)
BLE CTS: fixed signedness of timezone
Diffstat (limited to 'src/components/datetime/DateTimeController.h')
-rw-r--r--src/components/datetime/DateTimeController.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/components/datetime/DateTimeController.h b/src/components/datetime/DateTimeController.h
index 681bafbf..24a3ed40 100644
--- a/src/components/datetime/DateTimeController.h
+++ b/src/components/datetime/DateTimeController.h
@@ -48,7 +48,7 @@ namespace Pinetime {
* timezone is expected to be constant over DST which will be reported in
* dst field.
*/
- void SetTimeZone(uint8_t timezone, uint8_t dst);
+ void SetTimeZone(int8_t timezone, int8_t dst);
void UpdateTime(uint32_t systickCounter);
uint16_t Year() const {
@@ -80,7 +80,7 @@ namespace Pinetime {
* supports the BLE CTS Local Time Characteristic. Expect it to be 0
* if not.
*/
- uint8_t UtcOffset() const {
+ int8_t UtcOffset() const {
return tzOffset + dstOffset;
}
@@ -92,7 +92,7 @@ namespace Pinetime {
* supports the BLE CTS Local Time Characteristic. Expect it to be 0
* if not.
*/
- uint8_t TzOffset() const {
+ int8_t TzOffset() const {
return tzOffset;
}
@@ -105,7 +105,7 @@ namespace Pinetime {
* supports the BLE CTS Local Time Characteristic. Expect it to be 0
* if not.
*/
- uint8_t DstOffset() const {
+ int8_t DstOffset() const {
return dstOffset;
}
@@ -136,8 +136,8 @@ namespace Pinetime {
uint8_t hour = 0;
uint8_t minute = 0;
uint8_t second = 0;
- uint8_t tzOffset = 0;
- uint8_t dstOffset = 0;
+ int8_t tzOffset = 0;
+ int8_t dstOffset = 0;
uint32_t previousSystickCounter = 0;
std::chrono::time_point<std::chrono::system_clock, std::chrono::nanoseconds> currentDateTime;