Using time functions (localtime() with timezone corr)

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using time functions (localtime() with timezone corr)

921 Views
lpcware
NXP Employee
NXP Employee
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
0 Kudos
Reply
1 Reply

864 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by CodeRedSupport on Wed Nov 02 07:41:05 MST 2011
Sorry, Redlib provides no support for timezones.

Regards,
CodeRedSupport
0 Kudos
Reply