I am trying to get information on when was the last date a file was modified in java. I have the date in long format. I dont know why the long object is showing the year to be 1970.Below is my code
File mypath=new File(my_global_folder+"/"+mydata.getItemAtPosition(position));
long time=mypath.lastModified();
//When i try to convert long to Date the year part reads 1970
Date mydate= new Date(time);
Can anyone help me modify the code to give the right lat modified date