utzig commented on a change in pull request #928: datetime: use timezone for clocktime_to_timeval URL: https://github.com/apache/mynewt-core/pull/928#discussion_r176161809
########## File path: time/datetime/src/datetime.c ########## @@ -140,6 +140,10 @@ clocktime_to_timeval(const struct clocktime *ct, struct os_timeval *tv) ct->sec; tv->tv_usec = ct->usec; + /* Convert localtime to utctime */ + tv->tv_sec += tz->tz_minuteswest * 60; Review comment: Should allow for passing no `tz` (aka `NULL`). ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services