Dates.unix2datetime(mtime(filename)) should work to get the modification date and time of a file, I think?
for many I get always that date : 1970-01-01T00:00:00
Maybe you are just passing an incorrect filename (or an incorrect path)? mtime returns 0.0 for files that don’t exist, which corresponds to the Unix epoch of January 1, 1970.