in reply to calculating 24 hours ago with localtime
If the above assumptions are correct, then I wouldn't bother messing around with localtime. I'd just do it with the sql. Not sure which db you are using, but with mysql the following would suffice:
DELETE FROM time_now WHERE time < (NOW() - INTERVAL 5 MINUTE); DELETE FROM day_now WHERE time < (NOW() - INTERVAL 1 DAY);
Apologies if I've misunderstood your question. If that's the case, perhaps you could clarify a bit.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: calculating 24 hours ago with localtime
by Anonymous Monk on Dec 09, 2005 at 08:07 UTC | |
by McDarren (Abbot) on Dec 09, 2005 at 08:28 UTC |