Caching Bug?
Brought to you by:
iridium
|
From: Danny L. <da...@sq...> - 2002-10-08 12:07:57
|
I came across this when investigating why my phpweather seemed to be
causing longer than expected page load times during the period it should
have been using the cache. In essence, a majority of phpweather calls
on my site are not using the cache as designed (cache misses if you
will):
The phpweather uses the following construct in phpweather.inc:
$date_parts = explode(':', strtr($date, '/ ', '::'));
$date_unixtime = gmmktime($date_parts[3], $date_parts[4], 0,
$date_parts[1], $date_parts[2], $date_parts[0]);
Here's an example of my metar table:
metar=EGSC 071150Z 10001KT 9999 FEW027 BKN055 16/07 Q1020,
timestamp=20021009030000, station=EGSC
The report time is 11:50 on 10/07 but that timestamp looks really odd
03:00 on 10/09. Now that can't be right.
I don't know whether this is a bug in php-4.2.3's implementation of
gmmktime but I've verified that the correct information is going into
the call.
Any ideas?
--
Danny Ledger (a.k.a squatty)
da...@sq...
http://www.squatty.com
|