fix(api): some dates were not returned as UTC

This commit is contained in:
Gauthier Roebroeck 2023-01-17 15:06:55 +08:00
parent bb7b7fd8f0
commit cdfb8e377f
2 changed files with 5 additions and 3 deletions

View file

@ -2,6 +2,7 @@ package org.gotson.komga.interfaces.api.rest.dto
import com.fasterxml.jackson.annotation.JsonFormat
import org.gotson.komga.domain.model.AuthenticationActivity
import org.gotson.komga.language.toUTC
import java.time.LocalDateTime
data class AuthenticationActivityDto(
@ -24,6 +25,6 @@ fun AuthenticationActivity.toDto() =
userAgent = userAgent,
success = success,
error = error,
dateTime = dateTime,
dateTime = dateTime.toUTC(),
source = source,
)

View file

@ -1,6 +1,7 @@
package org.gotson.komga.interfaces.api.rest.dto
import org.gotson.komga.domain.model.PageHashKnown
import org.gotson.komga.language.toUTC
import java.time.LocalDateTime
data class PageHashKnownDto(
@ -20,6 +21,6 @@ fun PageHashKnown.toDto() = PageHashKnownDto(
size = size,
action = action,
deleteCount = deleteCount,
created = createdDate,
lastModified = lastModifiedDate,
created = createdDate.toUTC(),
lastModified = lastModifiedDate.toUTC(),
)