I am trying to give timestamp to the file name, but it is giving epoch time, is there anyway to do that?
import java.io.File;
import java.sql.Date;
import java.text.SimpleDateFormat;
import java.util.concurrent.TimeUnit;
import java.time.*;
File scrFile = ((TakesScreenshot)control).getScreenshotAs(OutputType.FILE);
String filename = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss z'.png'").format(new Date(0));
File dest = new File("C:\\tmp\\" + filename);
FileUtils.copyFile(scrFile, dest);
System.out.println("The screenshot is taken");
thanks in advance.