Using time functions (localtime() with timezone corr)

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Using time functions (localtime() with timezone corr)

919件の閲覧回数
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 返信

862件の閲覧回数
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 件の賞賛
返信