michallenc commented on PR #9578: URL: https://github.com/apache/nuttx/pull/9578#issuecomment-1600244437
> But I can't understand why need reset the cache info if only one zoneinfo file exist. Our application has one generic zoneinfo file stored in flash memory. This file can be any zone. And there might be a case that incorrect timezone is written in that file. In that case new timezone file is uploaded to the board at runtime (via USB, CAN etc...) and it rewrites the previous file. However in that case localtime is not updated as previous zoneinfo is still cached. There are basically three options how to handle this: 1. board reset (we dont want to do this as the update should be at runtime) 2. I can change `TZ` env from the application to NULL value, then set timezone, then set env to correct name and set timezone again. 3. use of `tzreset()` There is a problem of `tzreset()` not being POSIX so I understand why we might not want it in localtime. Perhaps we could add Kconfig to skip `tzreset()` by default and leave it optional (just skip `tzreset()`, not entire `g_lcl_tzname` related code). Or there is always option to go with approach 2 if this gets declined. -- 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]
