diff --git a/src/main/java/eu/m724/wtapi/object/Twilight.java b/src/main/java/eu/m724/wtapi/object/Twilight.java index ebc4e76..5ea3754 100644 --- a/src/main/java/eu/m724/wtapi/object/Twilight.java +++ b/src/main/java/eu/m724/wtapi/object/Twilight.java @@ -2,14 +2,15 @@ package eu.m724.wtapi.object; import java.time.Duration; import java.time.LocalDate; +import java.time.LocalDateTime; /** * @param date The date this object contains times for - * @param sunrise Time of sunrise relative to UTC midnight of the date - * @param sunset Time of sunset relative to UTC midnight of the date + * @param sunrise Time of sunrise + * @param sunset Time of sunset */ -public record Twilight(LocalDate date, Duration sunrise, Duration sunset) { +public record Twilight(LocalDate date, LocalDateTime sunrise, LocalDateTime sunset) { public Duration getDayLength() { - return sunset.minus(sunrise); + return Duration.between(sunrise, sunset); } }