fix: fixed issue with month not being passed correctly
This commit is contained in:
parent
b1fc971825
commit
3e8a2d2d83
1 changed files with 1 additions and 1 deletions
|
@ -173,7 +173,7 @@ object TimeUtil {
|
|||
val formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm")
|
||||
val zoneId = ZoneId.of(zone)
|
||||
val now = ZonedDateTime.now(zoneId)
|
||||
val localDateTime = LocalDateTime.parse("${now.year}-${now.monthValue}-${if (now.dayOfMonth < 10) "0${now.dayOfMonth}" else now.dayOfMonth} $inp", formatter)
|
||||
val localDateTime = LocalDateTime.parse("${now.year}-${if (now.monthValue < 10) "0${now.monthValue}" else now.monthValue}-${if (now.dayOfMonth < 10) "0${now.dayOfMonth}" else now.dayOfMonth} $inp", formatter)
|
||||
val zdtPre = ZonedDateTime.of(localDateTime, zoneId)
|
||||
if(zdtPre.isBefore(now))
|
||||
return zdtPre.plusDays(1)
|
||||
|
|
Loading…
Reference in a new issue