Skip to content

Commit

Permalink
Changed log message
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphiMC committed May 19, 2024
1 parent dd8f752 commit aeb22ae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/net/raphimc/minecraftauth/util/TimeUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,10 @@ public static synchronized Duration getClientTimeOffset() {
CLIENT_TIME_OFFSET = Duration.between(clientTime, serverTime);

if (CLIENT_TIME_OFFSET.abs().compareTo(Duration.ofMinutes(2)) > 0) {
MinecraftAuth.LOGGER.warn("Local clock is off by " + CLIENT_TIME_OFFSET.toMinutes() + " minutes");
MinecraftAuth.LOGGER.warn("Local clock is off by " + CLIENT_TIME_OFFSET.negated().toMinutes() + " minutes");
}
} catch (Throwable e) {
MinecraftAuth.LOGGER.error("Failed to get client time offset. This may cause issues with authentication");
MinecraftAuth.LOGGER.error("Failed to get client time offset. This may cause issues with authentication if the local clock is wrong.");
e.printStackTrace();
CLIENT_TIME_OFFSET = Duration.ZERO;
}
Expand Down

0 comments on commit aeb22ae

Please sign in to comment.