From acf1c75a32aa05f34d9d60b6ae3f3e052b532e9f Mon Sep 17 00:00:00 2001
From: peternameyakj <908253177@qq.com>
Date: Tue, 29 Apr 2025 18:31:21 +0800
Subject: [PATCH] 时区修改24小时制,北京时间

---
 src/main/java/project/web/api/RealtimeController.java |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/project/web/api/RealtimeController.java b/src/main/java/project/web/api/RealtimeController.java
index a293fb1..5530d9e 100644
--- a/src/main/java/project/web/api/RealtimeController.java
+++ b/src/main/java/project/web/api/RealtimeController.java
@@ -93,8 +93,8 @@
 			map.put("ts", realtime.getTs());
 			String currentTime = realtime.getCurrent_time();
 			// 设置时区为纽约的冬令时(Eastern Standard Time, EST)
-			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.ENGLISH);
-			sdf.setTimeZone(TimeZone.getTimeZone("America/New_York"));
+			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
+			sdf.setTimeZone(TimeZone.getTimeZone("Asia/Shanghai"));
 			Date parsedDate = sdf.parse(currentTime);
 			map.put("current_time",sdf.format(parsedDate));
 			map.put("name", realtime.getName());

--
Gitblit v1.9.3