[Zope-dev] problems with file caching
Martijn Pieters
Martijn Pieters <mj@digicool.com>
Mon, 13 Dec 1999 09:57:47 +0100
Friday, December 10, 1999, 1:15:31 AM, Jonothan Farr wrote:
JF> As you can see, the request header says:
JF> if-modified-since: Wed, 15 Sep 1999 21:11:30 GMT; length=649
JF> and the response header says:
JF> last-modified: Wed, 15 Sep 1999 21:11:30 GMT
JF> but the DateTime class converts this time to:
JF> Wed Sep 15 14:11:29 1999
JF> which is off by one second, so it thinks that the file has in fact been
JF> modified.
JF> The workaround I came up with for this is to round off the time value
JF> generated by the DateTime class.
JF> ms=DateTime(ms).timeTime()
JF> ms = round(ms, 1)
JF> If I am correct, and this is actually a problem with the DateTime class, I
JF> would like to see it fixed, though.
What platform are you running on? I saw the same rounding problem on
SGI IRIX, but couldn't reproduce it on Linux. As I also saw similar
differences in fp tests on PostgreSQL, I blame it on the OS and
hardware.
--
Best regards,
Martijn Pieters mailto:mj@digicool.com