michallenc commented on PR #9578:
URL: https://github.com/apache/nuttx/pull/9578#issuecomment-1600756048

   > @michallenc maybe instead of creating a Kconfig entry to skip tzreset() 
you can create a CONFIG_LOCALTIME_ALWAYS_SET_TZ and then:
   > 
   > ```
   > /* Verify if we can skip setting TZ case it is the same as previous TZ */
   > 
   > #ifndef CONFIG_LOCALTIME_ALWAYS_SET_TZ
   >   if (g_lcl_isset > 0 && strcmp(g_lcl_tzname, name) == 0)
   >     {
   >       return;
   >     }
   > #endif
   > ```
   
   @acassis Yes, but that would also mean TZ is set everytime I call 
`localtime`, right? That would be a lot unnecessary instructions.


-- 
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]

Reply via email to