From df2b9bb00ee345e8a4fc13622df08ef61c75e1ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E9=95=BF=E9=BE=99?= Date: Thu, 29 Jun 2017 17:44:28 +0800 Subject: [PATCH] fixed the top api not 24 hour fixed the top api not 24 hour --- .../java/org/weiboad/ragnar/server/util/DateTimeHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/main/java/org/weiboad/ragnar/server/util/DateTimeHelper.java b/server/src/main/java/org/weiboad/ragnar/server/util/DateTimeHelper.java index 9fc6ad9..685410a 100644 --- a/server/src/main/java/org/weiboad/ragnar/server/util/DateTimeHelper.java +++ b/server/src/main/java/org/weiboad/ragnar/server/util/DateTimeHelper.java @@ -41,7 +41,7 @@ public static long getHourTime(Long timestamp) { public static long getHour(Long timestamp) { Calendar cal = Calendar.getInstance(); cal.setTimeInMillis(timestamp * 1000); - return (cal.get(Calendar.HOUR)); + return (cal.get(Calendar.HOUR_OF_DAY)); } //获取当前时间