]> granicus.if.org Git - esp-idf/commit
syscalls: fix wraparound of RTC time
authorIvan Grokhotkov <ivan@espressif.com>
Fri, 19 May 2017 03:37:16 +0000 (11:37 +0800)
committerIvan Grokhotkov <ivan@espressif.com>
Mon, 12 Jun 2017 07:21:43 +0000 (15:21 +0800)
commitcc8af682444469cf15bdb988ea092c11dc213b14
tree246fbf19cba18681ff709a7cf83a37cd91ee0a99
parente7db29b2a8355d3e63b1c28b47b3206988b15cf1
syscalls: fix wraparound of RTC time

This change removes the erroneous cast to uint32_t (which caused time to
wrap around after 1 hour) and splits the multiplication into two terms
to remove the wraparound after 13 days.

Ref. https://esp32.com/viewtopic.php?f=13&t=1908
components/newlib/time.c