From 42795641a55e0a89f9674cb65b8e71024508293d Mon Sep 17 00:00:00 2001 From: joeycastillo Date: Fri, 21 Jan 2022 16:26:12 +0000 Subject: deploy: a21ad54aac11fa2624105ba0a203808416d228be --- group__utility.html | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) (limited to 'group__utility.html') diff --git a/group__utility.html b/group__utility.html index 701bd865..4c31d1e0 100644 --- a/group__utility.html +++ b/group__utility.html @@ -87,6 +87,9 @@ Functions watch_date_time watch_utility_date_time_from_unix_time (uint32_t timestamp, uint32_t utc_offset)  Returns the UNIX time (seconds since 1970) for a given watch_date_time struct. More...
  +watch_date_time watch_utility_date_time_convert_zone (watch_date_time date_time, uint32_t origin_utc_offset, uint32_t destination_utc_offset) + Converts a time from a given time zone to another time zone. More...
+  float watch_utility_thermistor_temperature (uint16_t value, bool highside, float b_coefficient, float nominal_temperature, float nominal_resistance, float series_resistance)  Returns a temperature in degrees Celsius for a given thermistor voltage divider circuit. More...
  @@ -167,6 +170,52 @@ Functions
Returns
A UNIX timestamp for the given date/time and UTC offset.
Note
Implemented by Wesley Ellis (tahnok) and based on BSD-licensed code by Josh Haberman: https://blog.reverberate.org/2020/05/12/optimizing-date-algorithms.html
+ + + +

◆ watch_utility_date_time_convert_zone()

+ +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
watch_date_time watch_utility_date_time_convert_zone (watch_date_time date_time,
uint32_t origin_utc_offset,
uint32_t destination_utc_offset 
)
+
+ +

Converts a time from a given time zone to another time zone.

+
Parameters
+ + + + +
date_timeThe watch_date_time that you wish to convert
origin_utc_offsetThe number of seconds from UTC in the origin time zone
destination_utc_offsetThe number of seconds from UTC in the destination time zone
+
+
+
Returns
A watch_date_time for the given UNIX timestamp and UTC offset, or if outside the range that watch_date_time can represent, a watch_date_time with all fields set to 0.
+
Note
Adapted from MIT-licensed code from musl, Copyright © 2005-2014 Rich Felker, et al.: https://github.com/esmil/musl/blob/1cc81f5cb0df2b66a795ff0c26d7bbc4d16e13c6/src/time/__secs_to_tm.c
+
-- cgit v1.2.3