newlib: how to set local timezone for localtime()

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

newlib: how to set local timezone for localtime()

1,410件の閲覧回数
giusloq
Contributor III

I have an UTC time (seconds since epoch) received from a NTP server. I need to convert it to broken-down local time.

I know I can use localtime(), but it returns the UTC broken-down time. I think because no timezone is configured.

I'm using MCUXpresso IDE and newlib-nano libraries.

Now the question: I can configure the timezone that must be used during localtime() conversion? In my case, it is Italy timezone. Of course, the daylight should be taken into account.

タグ(2)
0 件の賞賛
返信
0 返答(返信)