This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

"localtime" library function vs local timezone

I am currently trying to convert a unix/epoch time (time_t type) to the local timezone's time using the localtime library function. The conversion from the time_t type to the tm structure type works well using this function, but the converted time is referenced to GMT.

Comments in time.h would make one believe that it should be possible to convert to the local timezone's time:

   /*
    * converts the calendar time pointed to by timer into a broken-down time,
    * expressed a local time.
    * Returns: a pointer to that object.
    */

I have tried to find a way to configure the local timezone, but have been unsuccessful up to now.

Would anyone happen to know if it is feasible to configure the timezone that the library uses, and if so, how this would be done.

I am thanking you in advance for your help.