Content originally posted in LPCWare by FlySnake on Wed Nov 02 01:17:18 MST 2011
Hi!
I need to convert NTP time into broken-down time representation. NTP time is taken from internet, corrected into unix time and then fed to localtime() function. But in returned struct I get UTC time, not local. To make it local time I need to set TZ env variable (man 3 localtime), but this is not GNU/Linux. How can I do this in Cortex-M3 ? Of course I can manually correct time to desirable timezone and daylight savings, but it's not very beautiful.
Thanks