michallenc commented on code in PR #9578:
URL: https://github.com/apache/nuttx/pull/9578#discussion_r1235805731
##########
libs/libc/time/lib_localtime.c:
##########
@@ -2801,6 +2801,11 @@ void tzset(void)
nxrmutex_unlock(&g_lcl_lock);
}
+void tzreset(void)
+{
+ strlcpy(g_lcl_tzname, "", sizeof(g_lcl_tzname));
Review Comment:
I am not sure but probably no, because localtime would then have to reaload
data from zoneinfo file every time `localtime_r()` or `localtime()` is called
(every time you call `date` from NSH, every iteration your app reads time
etc.). I think the current implementation in `tzset()` is good.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]