mirror of
https://github.com/StarWishsama/Slimefun4.git
synced 2024-09-19 19:25:48 +00:00
Fixed Guide Settings showing "last activity" as a negative number
This commit is contained in:
parent
9f1b8790aa
commit
bb764b7584
@ -69,6 +69,7 @@
|
|||||||
* Fixed #2447
|
* Fixed #2447
|
||||||
* Fixed #2558
|
* Fixed #2558
|
||||||
* Fixed a duplication bug with the Block Placer
|
* Fixed a duplication bug with the Block Placer
|
||||||
|
* Fixed Slimefun Guide Settings showing "last activity" as a negative number
|
||||||
|
|
||||||
## Release Candidate 17 (17 Oct 2020)
|
## Release Candidate 17 (17 Oct 2020)
|
||||||
|
|
||||||
|
@ -130,7 +130,8 @@ public final class NumberUtils {
|
|||||||
public static String getElapsedTime(@Nonnull LocalDateTime start, @Nonnull LocalDateTime end) {
|
public static String getElapsedTime(@Nonnull LocalDateTime start, @Nonnull LocalDateTime end) {
|
||||||
Validate.notNull(start, "Provided start was null");
|
Validate.notNull(start, "Provided start was null");
|
||||||
Validate.notNull(end, "Provided end was null");
|
Validate.notNull(end, "Provided end was null");
|
||||||
long hours = Duration.between(start, end).toHours();
|
|
||||||
|
long hours = Duration.between(end, start).toHours();
|
||||||
|
|
||||||
if (hours == 0) {
|
if (hours == 0) {
|
||||||
return "< 1h";
|
return "< 1h";
|
||||||
|
Loading…
Reference in New Issue
Block a user