in reply to file modification time

Have you looked at the built-in stat function?