Skip to content

Commit

Permalink
Merge pull request #231 from gama-platform/Complement-for-#160
Browse files Browse the repository at this point in the history
Fixes #160 for windows
  • Loading branch information
lesquoyb authored Jun 27, 2024
2 parents 4febf4e + 09d166f commit c294e99
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gama.ui.shared/src/gama/ui/shared/views/TestView.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@
import static gama.ui.shared.resources.IGamaIcons.TEST_FILTER;
import static gama.ui.shared.resources.IGamaIcons.TEST_SORT;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.PrintWriter;
import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashMap;
Expand Down Expand Up @@ -261,7 +263,7 @@ public void saveTests() {
final String path = dialog.open();
if (path == null) return;
Timestamp timestamp = new Timestamp(System.currentTimeMillis());
String file = path + "/" + "tests_" + timestamp.toString() + ".txt";
String file = path + File.separator + "tests_" + new SimpleDateFormat("yyyy-MM-dd HH.mm.ss").format(timestamp) + ".txt";
file = FileUtils.constructAbsoluteFilePath(GAMA.getRuntimeScope(), file, false);
try (PrintWriter out = new PrintWriter(file)) {
for (AbstractSummary summary : experiments) {
Expand Down

0 comments on commit c294e99

Please sign in to comment.