Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/Evolveum/midpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
KaterynaHonchar committed Jun 25, 2018
2 parents a92f487 + a620b8d commit ec4505e
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -29,6 +29,9 @@
import org.apache.wicket.util.file.Files;

import java.io.*;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.Collection;
import java.util.zip.ZipEntry;
import java.util.zip.ZipOutputStream;
Expand Down Expand Up @@ -99,7 +102,8 @@ protected File initFile() {
}

String suffix = isUseZip() ? "zip" : "xml";
String fileName = "ExportedData_" + getType().getSimpleName() + "_" + System.currentTimeMillis() + "." + suffix;
String currentTime = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy_MM_dd_HH_m_s"));
String fileName = "ExportedData_" + getType().getSimpleName() + "_" + currentTime + "." + suffix;
File file = new File(folder, fileName);

Writer writer = null;
Expand Down

0 comments on commit ec4505e

Please sign in to comment.