This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A patch for mktime.c and tz*.c.


> The patch that you sent does not behave the way that you describe.
> E.g. the patch has __tzfile_read set __daylight.  But this action
> occurs rarely, only at the start of the program, and after TZ changes;
> it doesn't occur for each ``given time''.  So (in general) it will
> disagree with the difference between standard time and DST at ``the
> given time''.
> 

That is absolutely false. In glibc 2

/* Convert *TP to a time_t value.  */
time_t
mktime (tp)
     struct tm *tp;
{
#ifdef _LIBC
  /* POSIX.1 8.1.1 requires that whenever mktime() is called, the
     time zone names contained in the external variable `tzname' shall
     be set as if the tzset() function had been called.  */
  __tzset ();
#endif
       
  return __mktime_internal (tp, localtime_r, &localtime_offset);
}
       

-- 
H.J. Lu (hjl@gnu.org)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]