aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/com/juick/server/api
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/juick/server/api')
-rw-r--r--src/main/java/com/juick/server/api/xnodeinfo2/Info.java5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/com/juick/server/api/xnodeinfo2/Info.java b/src/main/java/com/juick/server/api/xnodeinfo2/Info.java
index c12df55f..36e36bdd 100644
--- a/src/main/java/com/juick/server/api/xnodeinfo2/Info.java
+++ b/src/main/java/com/juick/server/api/xnodeinfo2/Info.java
@@ -7,7 +7,6 @@ import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.inject.Inject;
-import java.time.Instant;
import java.time.ZonedDateTime;
import java.time.temporal.ChronoUnit;
import java.util.Arrays;
@@ -36,9 +35,9 @@ public class Info {
UserStats userStats = new UserStats();
userStats.setTotal(jdbcTemplate.queryForObject("SELECT COUNT(*) FROM users WHERE banned=0", Integer.class));
userStats.setActiveMonth(jdbcTemplate.queryForObject("SELECT COUNT(*) FROM users WHERE banned=0 AND last_seen > ?",
- Integer.class, ZonedDateTime.now().minus(1, ChronoUnit.MONTHS).toInstant()));
+ Integer.class, ZonedDateTime.now().minus(1, ChronoUnit.MONTHS).toLocalDateTime()));
userStats.setActiveHalfyear(jdbcTemplate.queryForObject("SELECT COUNT(*) FROM users WHERE banned=0 AND last_seen > ?",
- Integer.class, ZonedDateTime.now().minus(6, ChronoUnit.MONTHS).toInstant()));
+ Integer.class, ZonedDateTime.now().minus(6, ChronoUnit.MONTHS).toLocalDateTime()));
Usage usage = new Usage();
usage.setUsers(userStats);
usage.setLocalPosts(jdbcTemplate.queryForObject("SELECT COUNT(*) FROM messages",