1
0
Fork 0
mirror of https://github.com/vanitasvitae/Smack.git synced 2024-11-22 12:02:05 +01:00

Use 24h timestamp in debuggers.

This commit is contained in:
Florian Schmaus 2016-10-20 17:44:23 +02:00
parent 98655e72aa
commit 6e04a9d0ff
2 changed files with 4 additions and 4 deletions

View file

@ -37,7 +37,7 @@ import java.util.Date;
* @author Gaston Dombiak * @author Gaston Dombiak
*/ */
public class ConsoleDebugger extends AbstractDebugger { 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) { public ConsoleDebugger(XMPPConnection connection, Writer writer, Reader reader) {
super(connection, writer, reader); super(connection, writer, reader);

View file

@ -206,7 +206,7 @@ public class EnhancedDebugger implements SmackDebugger {
// the GUI. This is what we call "interpreted" packet data, since it's the packet // 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. // data as Smack sees it and not as it's coming in as raw XML.
packetReaderListener = new StanzaListener() { 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) { public void processPacket(final Stanza packet) {
SwingUtilities.invokeLater(new Runnable() { 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 // Create a thread that will listen for all outgoing packets and write them to
// the GUI. // the GUI.
packetWriterListener = new StanzaListener() { 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) { public void processPacket(final Stanza packet) {
SwingUtilities.invokeLater(new Runnable() { SwingUtilities.invokeLater(new Runnable() {
@ -669,7 +669,7 @@ public class EnhancedDebugger implements SmackDebugger {
connPanel.add( connPanel.add(
label, label,
new GridBagConstraints(0, 3, 1, 1, 0.0, 0.0, 21, 0, new Insets(0, 0, 0, 0), 0, 0)); 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.setMinimumSize(new java.awt.Dimension(150, 20));
field.setMaximumSize(new java.awt.Dimension(150, 20)); field.setMaximumSize(new java.awt.Dimension(150, 20));
field.setValue(creationTime); field.setValue(creationTime);