PHP last time modified script time way off
I am just starting out with PHP, and wanted to write a very simple (how many scripts are one liners?) script to do just that. It displays the time, but the the wrong one. For example:
December 31 1969 7:00:00 when the date was actually November 5 2002 10:50. Anybody have any pointers? Thanks |
Can you show us your script? Here's what seems a little odd to me right off the bat: that date --December 31 1969 7:00:00-- is the day before the epoch --jan 1 1970 00:00:00--, so I'd be willing to bet that you're probably passing a negative number to the date print function.
|
I just figured it out. Here was my old script:
Code:
echo date( "F d Y h:i:s", getlastmod() ); And here is my new one: Code:
$last_modified = filemtime("<filename>"); |
All times are GMT -5. The time now is 01:40 AM. |