| re: Problem with filemtime- am I missing something?
"Kenny Halley" <kenny@halleynet.com> wrote in
news:cugje5$r7t$1$8302bc10@news.demon.co.uk:
[color=blue]
> The basic funtionality seems to work but the time I get out is odd. I
> have broken my code down to a simple read the file time and print it
> on screen but this returns the same time.
> If I telnet to the server and read the last modded time it says (at
> present 10:22) But my php script outputs 10:02. This seems to stay
> like this for an hour then outputs 11:02.[/color]
You keep getting 02 because it's February.
OK, I was tempted to stop there and give your brain a workout ;) but I
guess I'll toss in the explanation. When using date functions, 'm'
represents the month in numeric form, not the minute. You want to use
'i' to get the minute, e.g.
echo date('Y-m-d H:i');
hth
--
Bulworth : PHP/MySQL/Unix | Email : str_rot13('f@fung.arg');
--------------------------|---------------------------------
<http://www.phplabs.com/> | PHP scripts, webmaster resources |