java.io.File.lastModified returns 0
Hello, all,
I'm working on some legacy code, and the original developer was manually setting a "last modified" date on documents he worked on. I learned that there is a programmatic way of doing this, and I'm trying, but the value returned is 0.
<!--- I got this from Pete Freitag's blog. --->
<cfset thisFile = CreateObject("java","java.io.File") />
<cfset thisFile.init("" & cgi.script_name & "") />
<cfset lastMod = thisFile.lastModified() />
<cfset lastMod = DateFormat(DateAdd('s',lastMod,"January 1 1970 00:00:00"),"mmmm dd, yyyy") />
Last mod is reporting as January 1, 1970, which means that it's 0. Please advise.
V/r,
^ _ ^
