diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/amf/amf0/Amf0Exporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/amf/amf0/Amf0Exporter.java index eed509b3c..a7631b30b 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/amf/amf0/Amf0Exporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/amf/amf0/Amf0Exporter.java @@ -183,7 +183,7 @@ public class Amf0Exporter { if (value instanceof DateType) { DateType dt = (DateType) value; - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SS"); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); StringBuilder sb = new StringBuilder(); sb.append("{").append(newLine); sb.append(indent(level + 1)).append("\"type\": \"Date\",").append(newLine); diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/amf/amf3/Amf3Exporter.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/amf/amf3/Amf3Exporter.java index 0463a9ebb..c9328628c 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/amf/amf3/Amf3Exporter.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/exporters/amf/amf3/Amf3Exporter.java @@ -341,7 +341,7 @@ public class Amf3Exporter { + indent(level) + "}"; } else if (object instanceof DateType) { DateType dt = (DateType) object; - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SS"); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); return "{" + newLine + indent(level + 1) + "\"type\": \"Date\"," + newLine + addId diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/importers/amf/amf0/Amf0Importer.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/importers/amf/amf0/Amf0Importer.java index 3308b8fda..4d3e30fd6 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/importers/amf/amf0/Amf0Importer.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/importers/amf/amf0/Amf0Importer.java @@ -367,7 +367,7 @@ public class Amf0Importer { String id = typedObject.containsKey("id") ? typedObject.getString("id") : null; switch (typeStr) { case "Date": - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SS"); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); String dateStr = typedObject.getString("value"); int timeZone = (int) (long) (double) typedObject.getDouble("timezone"); try { diff --git a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/importers/amf/amf3/Amf3Importer.java b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/importers/amf/amf3/Amf3Importer.java index e661704c9..c4e1b186d 100644 --- a/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/importers/amf/amf3/Amf3Importer.java +++ b/libsrc/ffdec_lib/src/com/jpexs/decompiler/flash/importers/amf/amf3/Amf3Importer.java @@ -372,7 +372,7 @@ public class Amf3Importer { String id = typedObject.containsKey("id") ? typedObject.getString("id") : null; switch (typeStr) { case "Date": - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SS"); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS"); String dateStr = typedObject.getString("value"); try { resultObject = new DateType((double) sdf.parse(dateStr).getTime()); diff --git a/libsrc/ffdec_lib/testdata/sharedobjects/sharedobjects.swf b/libsrc/ffdec_lib/testdata/sharedobjects/sharedobjects.swf index 240b876c9..8232bc320 100644 Binary files a/libsrc/ffdec_lib/testdata/sharedobjects/sharedobjects.swf and b/libsrc/ffdec_lib/testdata/sharedobjects/sharedobjects.swf differ diff --git a/libsrc/ffdec_lib/testdata/sharedobjects/sharedobjects/DOMDocument.xml b/libsrc/ffdec_lib/testdata/sharedobjects/sharedobjects/DOMDocument.xml index 561eeeaf4..ce8d7bf8b 100644 --- a/libsrc/ffdec_lib/testdata/sharedobjects/sharedobjects/DOMDocument.xml +++ b/libsrc/ffdec_lib/testdata/sharedobjects/sharedobjects/DOMDocument.xml @@ -24,7 +24,7 @@ for (var i = 0; i < 70000; i++) { s += "A"; } -var dt = new Date(2024,12-1,3,23,16); +var dt = new Date(2024,12-1,3,23,16,56,5); var xm = new XMLDocument("