From 1df17949e0e61dbc255cee35160a9a08986e35dd Mon Sep 17 00:00:00 2001 From: Alena Bandarovich Date: Fri, 9 Feb 2024 19:16:00 +0100 Subject: [PATCH] Change time format to 24 hr --- src/main/java/ChatClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/ChatClient.java b/src/main/java/ChatClient.java index d593022..7ff74a6 100644 --- a/src/main/java/ChatClient.java +++ b/src/main/java/ChatClient.java @@ -97,7 +97,7 @@ public class ChatClient extends JFrame implements KeyListener { } private void updateTime() { - SimpleDateFormat sdf = new SimpleDateFormat("hh:mm:ss a"); + SimpleDateFormat sdf = new SimpleDateFormat("HH:mm:ss"); String currentTime = sdf.format(new Date()); timeLabel.setText("Current Time: " + currentTime); }