I would like to list files in a directory with correct time and date the files were created. But the following code gave me time stamp of December 31 1969 19:00:00 when the files are recently created. How do I get the right time and date? $dir = opendir("temp_dir"); while (($file = readdir($dir)) !== false) { $ftime = date("F d Y H:i:s.",filemtime($file)); echo $file.' '. $ftime; } Thanks in advance.