diff --git a/CS2JLibrary/.settings/org.eclipse.wst.common.project.facet.core.xml b/CS2JLibrary/.settings/org.eclipse.wst.common.project.facet.core.xml
deleted file mode 100644
index 1f191ed..0000000
--- a/CS2JLibrary/.settings/org.eclipse.wst.common.project.facet.core.xml
+++ /dev/null
@@ -1,4 +0,0 @@
-
-
-
-
diff --git a/CS2JLibrary/NetFramework/System/Collections/ArrayList.xml b/CS2JLibrary/NetFramework/System/Collections/ArrayList.xml
index 6ce092a..9aaeb5c 100644
--- a/CS2JLibrary/NetFramework/System/Collections/ArrayList.xml
+++ b/CS2JLibrary/NetFramework/System/Collections/ArrayList.xml
@@ -1,4 +1,4 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/CS2JLibrary/src/CS2JNet/System/DateTimeSupport.java b/CS2JLibrary/src/CS2JNet/System/DateTimeSupport.java
index e933695..728a8cb 100755
--- a/CS2JLibrary/src/CS2JNet/System/DateTimeSupport.java
+++ b/CS2JLibrary/src/CS2JNet/System/DateTimeSupport.java
@@ -26,6 +26,7 @@ import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.Locale;
+import java.util.TimeZone;
import CS2JNet.JavaSupport.util.LocaleSupport;
@@ -81,11 +82,16 @@ public class DateTimeSupport {
"yyyy-MM-dd"};
public static Date parse(String s) throws ParseException
- {
+ {
+ return parse(s, false);
+ }
+
+ public static Date parse(String s, boolean utc) throws ParseException
+ {
String val = trimMilliSecondsToThreeDigits(s);
- return parse(val, DATE_FORMATS, Locale.getDefault());
- }
-
+ return parse(val, DATE_FORMATS, Locale.getDefault(), utc);
+ }
+
protected static String trimMilliSecondsToThreeDigits(String dateString){
String val = dateString;
if(val != null){
@@ -115,12 +121,21 @@ public class DateTimeSupport {
}
public static Date parse(String s, String[] formats, Locale loc) throws ParseException
- {
+ {
+ return parse(s, formats, loc, false);
+ }
+
+ public static Date parse(String s, String[] formats, Locale loc, boolean utc) throws ParseException
+ {
for (String f : formats)
{
try
{
- Date d = (new SimpleDateFormat(f)).parse(s);
+ SimpleDateFormat sdf = new SimpleDateFormat(f);
+ if(utc){
+ sdf.setTimeZone(TimeZone.getTimeZone("UTC"));
+ }
+ Date d = sdf.parse(s);
// System.out.println("Date: "+ d.toString());
return d;
}
diff --git a/CS2JLibrary/src/CS2JNet/System/IO/DirectorySupport.java b/CS2JLibrary/src/CS2JNet/System/IO/DirectorySupport.java
index 975f10c..0d9218c 100755
--- a/CS2JLibrary/src/CS2JNet/System/IO/DirectorySupport.java
+++ b/CS2JLibrary/src/CS2JNet/System/IO/DirectorySupport.java
@@ -109,7 +109,7 @@ public class DirectorySupport {
String[] allFilePaths = new String[allFiles.length];
for (int i = 0; i < allFilePaths.length; i++) {
- allFilePaths[i] = allFiles[i].getCanonicalPath();
+ allFilePaths[i] = allFiles[i].getAbsolutePath();
}
return allFilePaths;
@@ -131,7 +131,7 @@ public class DirectorySupport {
File[] matchDirs = new File(path).listFiles(DirectorySupport.dirFilter(patternComponents[0]));
for (File d : matchDirs)
{
- allMatches.addAll(Arrays.asList(getFiles(d.getCanonicalPath(),patternComponents[1])));
+ allMatches.addAll(Arrays.asList(getFiles(d.getAbsolutePath(),patternComponents[1])));
}
}
@@ -142,7 +142,7 @@ public class DirectorySupport {
for (int i = 0; i < allFiles.length; i++)
{
- allMatches.add(i,((File)allFiles[i]).getCanonicalPath());
+ allMatches.add(i,((File)allFiles[i]).getAbsolutePath());
}
}
@@ -159,7 +159,7 @@ public class DirectorySupport {
String[] allDirPaths = new String[allDirs.length];
for (int i = 0; i < allDirPaths.length; i++) {
- allDirPaths[i] = allDirs[i].getCanonicalPath();
+ allDirPaths[i] = allDirs[i].getAbsolutePath();
}
return allDirPaths;
diff --git a/CS2JLibrary/src/CS2JNet/System/Xml/XmlNode.java b/CS2JLibrary/src/CS2JNet/System/Xml/XmlNode.java
index c03033b..9cab0f5 100755
--- a/CS2JLibrary/src/CS2JNet/System/Xml/XmlNode.java
+++ b/CS2JLibrary/src/CS2JNet/System/Xml/XmlNode.java
@@ -259,8 +259,8 @@ public class XmlNode implements Iterable {
{
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
DocumentBuilder builder = factory.newDocumentBuilder();
- Node dummyD = builder.parse(new InputSource(new StringReader("" + value + "")));
- Node importableNode = getNode().getOwnerDocument().importNode(dummyD.getFirstChild(), true);
+ Document dummyDoc = builder.parse(new InputSource(new StringReader("" + value + "")));
+ Node importableNode = getNode().getOwnerDocument().importNode(dummyDoc.getDocumentElement(), true);
Node myNode = getNode();
// First we remove all existing children
@@ -273,7 +273,7 @@ public class XmlNode implements Iterable {
}
// Now we insert the new children
- child = importableNode.getLastChild();
+ child = importableNode.getFirstChild();
while (child != null)
{
Node tmp = child;