Giuseppe Modugno
2018-03-31 06:16:20 UTC
I have the number of seconds since epoch 1970, in UTC. I'd like to convert
it into broken-down time (year, month, day, hours, ...). I live in Italy
and I need the broken-down in *local* time, so taking into account timezone
(+1 hour) *and* daylight savings.
My platform is a Cortex-M3 MCU from NXP. I'm using MCUXpresso IDE to build
my project and I'm using newlib-nano variant.
I looked at the code and it seems there is some instructions in localtime()
that take into account the timezone. However I don't know how to set
Italian timezone on my platform (somewhere I read I can set TZ environment
variable... but I don't have an environment at all).
Any help?
it into broken-down time (year, month, day, hours, ...). I live in Italy
and I need the broken-down in *local* time, so taking into account timezone
(+1 hour) *and* daylight savings.
My platform is a Cortex-M3 MCU from NXP. I'm using MCUXpresso IDE to build
my project and I'm using newlib-nano variant.
I looked at the code and it seems there is some instructions in localtime()
that take into account the timezone. However I don't know how to set
Italian timezone on my platform (somewhere I read I can set TZ environment
variable... but I don't have an environment at all).
Any help?