You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mynewt.apache.org by GitBox <gi...@apache.org> on 2018/03/21 18:42:16 UTC

[GitHub] sdalu opened a new issue #944: timezone daylight saving time, int16_t or boolean

sdalu opened a new issue #944: timezone daylight saving time, int16_t or boolean
URL: https://github.com/apache/mynewt-core/issues/944
 
 
   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
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services