From 6e04a9d0fff7f7023dd1e3c18e2e782f52aee0c8 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Thu, 20 Oct 2016 17:44:23 +0200 Subject: [PATCH] Use 24h timestamp in debuggers. --- .../org/jivesoftware/smack/debugger/ConsoleDebugger.java | 2 +- .../org/jivesoftware/smackx/debugger/EnhancedDebugger.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/smack-core/src/main/java/org/jivesoftware/smack/debugger/ConsoleDebugger.java b/smack-core/src/main/java/org/jivesoftware/smack/debugger/ConsoleDebugger.java index 1889ea3bc..311e8edb1 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/debugger/ConsoleDebugger.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/debugger/ConsoleDebugger.java @@ -37,7 +37,7 @@ import java.util.Date; * @author Gaston Dombiak */ public class ConsoleDebugger extends AbstractDebugger { - private final SimpleDateFormat dateFormatter = new SimpleDateFormat("hh:mm:ss aaa"); + private final SimpleDateFormat dateFormatter = new SimpleDateFormat("HH:mm:ss"); public ConsoleDebugger(XMPPConnection connection, Writer writer, Reader reader) { super(connection, writer, reader); diff --git a/smack-debug/src/main/java/org/jivesoftware/smackx/debugger/EnhancedDebugger.java b/smack-debug/src/main/java/org/jivesoftware/smackx/debugger/EnhancedDebugger.java index 8e12a3990..db6155d48 100644 --- a/smack-debug/src/main/java/org/jivesoftware/smackx/debugger/EnhancedDebugger.java +++ b/smack-debug/src/main/java/org/jivesoftware/smackx/debugger/EnhancedDebugger.java @@ -206,7 +206,7 @@ public class EnhancedDebugger implements SmackDebugger { // the GUI. This is what we call "interpreted" packet data, since it's the packet // data as Smack sees it and not as it's coming in as raw XML. packetReaderListener = new StanzaListener() { - SimpleDateFormat dateFormatter = new SimpleDateFormat("hh:mm:ss:SS aaa"); + SimpleDateFormat dateFormatter = new SimpleDateFormat("HH:mm:ss:SS"); public void processPacket(final Stanza packet) { SwingUtilities.invokeLater(new Runnable() { @@ -221,7 +221,7 @@ public class EnhancedDebugger implements SmackDebugger { // Create a thread that will listen for all outgoing packets and write them to // the GUI. packetWriterListener = new StanzaListener() { - SimpleDateFormat dateFormatter = new SimpleDateFormat("hh:mm:ss:SS aaa"); + SimpleDateFormat dateFormatter = new SimpleDateFormat("HH:mm:ss:SS"); public void processPacket(final Stanza packet) { SwingUtilities.invokeLater(new Runnable() { @@ -669,7 +669,7 @@ public class EnhancedDebugger implements SmackDebugger { connPanel.add( label, new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0, 21, 0, new Insets(0, 0, 0, 0), 0, 0)); - field = new JFormattedTextField(new SimpleDateFormat("yyyy.MM.dd hh:mm:ss:SS aaa")); + field = new JFormattedTextField(new SimpleDateFormat("yyyy.MM.dd HH:mm:ss:SS")); field.setMinimumSize(new java.awt.Dimension(150, 20)); field.setMaximumSize(new java.awt.Dimension(150, 20)); field.setValue(creationTime);