fix: 修复折线图时区问题

This commit is contained in:
tbphp
2025-07-13 23:50:49 +08:00
parent 1a800dd452
commit 2740254cf1
2 changed files with 15 additions and 3 deletions

View File

@@ -135,7 +135,7 @@ func (s *Server) Chart(c *gin.Context) {
for i := 0; i < 24; i++ {
hour := twentyFourHoursAgo.Add(time.Duration(i) * time.Hour).Truncate(time.Hour)
labels = append(labels, hour.Format("15:04"))
labels = append(labels, hour.Format(time.RFC3339))
if data, ok := statsByHour[hour]; ok {
successData = append(successData, data["success"])