httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <...@raleigh.ibm.com>
Subject Re: ap_current_time() is not intuitive
Date Thu, 06 Jan 2000 19:36:54 GMT

> > And hence the bug.  I get the currenttime, which is stored as a FILETIME.
> > I then ask for the unixtime, and that value is stored.  Next, I insert a
> > new FILETIME, but asking for the current time again, or by inserting it
> > with ap_put_os_time.  The next time I ask for the unixtime, I will get the
> > original time, which is wrong.  Take a look at the function which does the
> > conversion, it is some bit shifting, a simple bitwise or, and some
> > subtracting.  It just isn't slow enough to not call whenever we want the
> > unixtime.
> 
> Then make sure to clear the bit whenever a new FILETIME is stored. That
> bug does not invalidate the basic premise that FILETIME is the "proper"
> base format.
> 
> +1 to use FILETIME for the authoritative time format (and derive other
> formats from that).
> 

I agree 100% that FILETIME is the correct base format on Windows.  I
disagree that we should be storing the time_t format at all.  Storing it
is useless, because we have to check a bit every time regardless, and the
conversion routine is small and fast, and should be made inline as soon as
we start looking at making those types of changes.

Ryan

_______________________________________________________________________
Ryan Bloom		rbb@raleigh.ibm.com
4205 S Miami Blvd	
RTP, NC 27709		

Come to the first official Apache Software Foundation
Conference!  <http://ApacheCon.Com/>



Mime
View raw message