diff --git a/htroot/MessageSend_p.java b/htroot/MessageSend_p.java index 2f8e85e02..52870ae78 100644 --- a/htroot/MessageSend_p.java +++ b/htroot/MessageSend_p.java @@ -26,13 +26,12 @@ //if the shell's current path is HTROOT import java.io.IOException; -import java.text.SimpleDateFormat; import java.util.Date; -import java.util.Locale; import java.util.Map; import org.apache.http.entity.mime.content.ContentBody; +import net.yacy.cora.date.GenericFormatter; import net.yacy.cora.document.encoding.ASCII; import net.yacy.cora.document.encoding.UTF8; import net.yacy.cora.protocol.RequestHeader; @@ -49,9 +48,8 @@ import net.yacy.utils.crypt; public class MessageSend_p { - private static SimpleDateFormat SimpleFormatter = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss", Locale.US); public static String dateString(final Date date) { - return SimpleFormatter.format(date); + return GenericFormatter.SIMPLE_FORMATTER.format(date); } diff --git a/htroot/Messages_p.java b/htroot/Messages_p.java index 1c8c15ab4..40540d281 100644 --- a/htroot/Messages_p.java +++ b/htroot/Messages_p.java @@ -26,12 +26,11 @@ import java.io.File; import java.io.IOException; -import java.text.SimpleDateFormat; import java.util.Date; import java.util.Iterator; -import java.util.Locale; import java.util.TreeMap; +import net.yacy.cora.date.GenericFormatter; import net.yacy.cora.document.encoding.UTF8; import net.yacy.cora.protocol.HeaderFramework; import net.yacy.cora.protocol.RequestHeader; @@ -48,11 +47,10 @@ import com.google.common.io.Files; public class Messages_p { - private static SimpleDateFormat SimpleFormatter = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss", Locale.US); private static final String PEERSKNOWN = "peersKnown_"; public static String dateString(final Date date) { - return SimpleFormatter.format(date); + return GenericFormatter.SIMPLE_FORMATTER.format(date); } public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) { diff --git a/htroot/Wiki.java b/htroot/Wiki.java index 334fd0ef0..c456a8585 100644 --- a/htroot/Wiki.java +++ b/htroot/Wiki.java @@ -31,13 +31,12 @@ // if the shell's current path is HTROOT import java.io.IOException; -import java.text.SimpleDateFormat; import java.util.Date; import java.util.HashMap; import java.util.Iterator; -import java.util.Locale; import java.util.Map; +import net.yacy.cora.date.GenericFormatter; import net.yacy.cora.document.encoding.UTF8; import net.yacy.cora.protocol.Domains; import net.yacy.cora.protocol.HeaderFramework; @@ -57,9 +56,8 @@ public class Wiki { //private static String ListLevel = ""; //private static String numListLevel = ""; - private static SimpleDateFormat SimpleFormatter = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss", Locale.US); public static String dateString(final Date date) { - return SimpleFormatter.format(date); + return GenericFormatter.SIMPLE_FORMATTER.format(date); } diff --git a/htroot/yacy/message.java b/htroot/yacy/message.java index ed800fd0a..9f46515d4 100644 --- a/htroot/yacy/message.java +++ b/htroot/yacy/message.java @@ -31,13 +31,11 @@ import java.io.File; import java.io.IOException; import java.io.PrintWriter; import java.net.InetAddress; -import java.text.SimpleDateFormat; import java.util.Date; -import java.util.Locale; +import net.yacy.cora.date.GenericFormatter; import net.yacy.cora.document.encoding.UTF8; import net.yacy.cora.protocol.Domains; -import net.yacy.cora.protocol.HeaderFramework; import net.yacy.cora.protocol.RequestHeader; import net.yacy.cora.util.CommonPattern; import net.yacy.cora.util.ConcurrentLog; @@ -56,9 +54,8 @@ import com.google.common.io.Files; public final class message { - private static SimpleDateFormat SimpleFormatter = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss", Locale.US); public static String dateString(final Date date) { - return SimpleFormatter.format(date); + return GenericFormatter.SIMPLE_FORMATTER.format(date); } public static serverObjects respond(final RequestHeader header, final serverObjects post, final serverSwitch env) {