I am trying to get the modified time of my css file. I have tried the following:
$filename = '/~site/templates/mytemplate/css/template.css';
$filename2 = "/~site/templates/mytemplate/test.html";
echo "Last modified: " . date ("F d Y H:i:s.", filemtime($filename)) ."<br>";
echo "Last modified: " . date ("F d Y H:i:s.", getlastmod($filename)) ."<br>"
echo "Last modified: " . date ("F d Y H:i:s.", filemtime($filename2)) ."<br>";
echo "Last modified: " . date ("F d Y H:i:s.", getlastmod($filename2)) ."<br>";
Returns
Last modified: December 31 1969 18:00:00.
Last modified: November 06 2013 09:18:52.
Last modified: December 31 1969 18:00:00.
Last modified: November 06 2013 09:18:52.
But the actual mod date was yesterday, so it should be November 18 2013 16:01:00 The second file was this morning and I just created it to test!
What am I doing wrong? Is it the server returning the wrong date?