Using time functions (localtime() with timezone corr)

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Using time functions (localtime() with timezone corr)

1,015 次查看
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 项奖励
回复
1 回复

958 次查看
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 项奖励
回复