apache / apache/mynewt-core

timezone daylight saving time, int16_t or boolean

Open
#944 0 comments 0 reactions 1 assignee Claimed by @rymanluk View on GitHub
Dominant language
C
Stars
891
Forks
381
Avg merge
2d 7h
Merged PRs (30d)
14

Description

It looks like `tz_dsttime` was originally designed to hold the offset value in seconds, but is used as a boolean.
For bluetooth (current time service), it would be better to use tz_dsttime as a second-offset, as bluetooth can have DST of 0, 30min, 60min, 120min [1]

os_time.h
~~~
struct os_timezone {
int16_t tz_minuteswest;
int16_t tz_dsttime;
};
~~~

datetime.c:
~~~
tz->tz_dsttime ? 3600 : 0
~~~

[1] https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.characteristic.dst_offset.xml

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.