Commit 0e53df85 authored by Christian Schudt's avatar Christian Schudt

Replace deprecated JiveConstants.XMPP_DELAY_DATETIME_FORMAT usage

with XMPPDateTimeFormat
parent 7a0753ba
...@@ -42,8 +42,8 @@ import org.dom4j.DocumentHelper; ...@@ -42,8 +42,8 @@ import org.dom4j.DocumentHelper;
import org.dom4j.Element; import org.dom4j.Element;
import org.jivesoftware.database.DbConnectionManager; import org.jivesoftware.database.DbConnectionManager;
import org.jivesoftware.util.EmailService; import org.jivesoftware.util.EmailService;
import org.jivesoftware.util.JiveConstants;
import org.jivesoftware.util.StringUtils; import org.jivesoftware.util.StringUtils;
import org.jivesoftware.util.XMPPDateTimeFormat;
import org.jivesoftware.xmpp.workgroup.DbProperties; import org.jivesoftware.xmpp.workgroup.DbProperties;
import org.jivesoftware.xmpp.workgroup.Workgroup; import org.jivesoftware.xmpp.workgroup.Workgroup;
import org.jivesoftware.xmpp.workgroup.WorkgroupManager; import org.jivesoftware.xmpp.workgroup.WorkgroupManager;
...@@ -175,7 +175,7 @@ public class ChatTranscriptManager { ...@@ -175,7 +175,7 @@ public class ChatTranscriptManager {
} }
// Define time zone used in the transcript. // Define time zone used in the transcript.
SimpleDateFormat UTC_FORMAT = new SimpleDateFormat(JiveConstants.XMPP_DELAY_DATETIME_FORMAT); SimpleDateFormat UTC_FORMAT = new SimpleDateFormat(XMPPDateTimeFormat.XMPP_DELAY_DATETIME_FORMAT);
UTC_FORMAT.setTimeZone(TimeZone.getTimeZone("UTC")); UTC_FORMAT.setTimeZone(TimeZone.getTimeZone("UTC"));
final SimpleDateFormat formatter = new SimpleDateFormat("h:mm a"); final SimpleDateFormat formatter = new SimpleDateFormat("h:mm a");
...@@ -378,7 +378,7 @@ public class ChatTranscriptManager { ...@@ -378,7 +378,7 @@ public class ChatTranscriptManager {
if (transcript == null || "".equals(transcript)) { if (transcript == null || "".equals(transcript)) {
return ""; return "";
} }
final SimpleDateFormat UTC_FORMAT = new SimpleDateFormat(JiveConstants.XMPP_DELAY_DATETIME_FORMAT); final SimpleDateFormat UTC_FORMAT = new SimpleDateFormat(XMPPDateTimeFormat.XMPP_DELAY_DATETIME_FORMAT);
UTC_FORMAT.setTimeZone(TimeZone.getTimeZone("UTC")); UTC_FORMAT.setTimeZone(TimeZone.getTimeZone("UTC"));
final SimpleDateFormat formatter = new SimpleDateFormat("h:mm a"); final SimpleDateFormat formatter = new SimpleDateFormat("h:mm a");
......
package com.reucon.openfire.plugin.archive.util; package com.reucon.openfire.plugin.archive.util;
import org.jivesoftware.util.JiveConstants; import org.jivesoftware.util.XMPPDateTimeFormat;
import java.text.DateFormat; import java.text.DateFormat;
import java.text.ParseException; import java.text.ParseException;
...@@ -16,7 +16,7 @@ public class XmppDateUtil { ...@@ -16,7 +16,7 @@ public class XmppDateUtil {
private static final DateFormat dateFormatWithoutMillis; private static final DateFormat dateFormatWithoutMillis;
static { static {
dateFormat = new SimpleDateFormat(JiveConstants.XMPP_DATETIME_FORMAT); dateFormat = new SimpleDateFormat(XMPPDateTimeFormat.XMPP_DATETIME_FORMAT);
dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); dateFormat.setTimeZone(TimeZone.getTimeZone("UTC"));
dateFormatWithoutMillis = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'"); dateFormatWithoutMillis = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");
dateFormatWithoutMillis.setTimeZone(TimeZone.getTimeZone("UTC")); dateFormatWithoutMillis.setTimeZone(TimeZone.getTimeZone("UTC"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment