2 * localtime - convert a calendar time into broken down time
9 /* We must be careful, since an int can't represent all the seconds in a day.
10 * Hence the adjustment of minutes when adding timezone and dst information.
11 * This assumes that both must be expressable in multiples of a minute.
12 * Furthermore, it is assumed that both fit into an integer when expressed as
13 * minutes (this is about 22 days, so this should not cause any problems).
16 localtime(const time_t *timer
)
22 timep
= gmtime(timer
); /* tm->tm_isdst == 0 */
23 timep
->tm_min
-= _timezone
/ 60;
24 timep
->tm_sec
-= _timezone
% 60;
29 timep
->tm_min
+= dst
/ 60;
30 timep
->tm_sec
+= dst
% 60;