tw.tw_zone = tm->tm_gmtoff / 60;
if (tm->tm_isdst) /* if DST is in effect */
tw.tw_zone -= 60; /* reset to normal offset */
tw.tw_zone = tm->tm_gmtoff / 60;
if (tm->tm_isdst) /* if DST is in effect */
tw.tw_zone -= 60; /* reset to normal offset */
snprintf (buffer, sizeof(buffer), "%s%02d%02d",
offset < 0 ? "-" : "+", abs (hours), abs (mins));
return buffer;
snprintf (buffer, sizeof(buffer), "%s%02d%02d",
offset < 0 ? "-" : "+", abs (hours), abs (mins));
return buffer;