Skip to content

Commit 812f43b

Browse files
authored
Merge pull request #141 from YAPP-Github/fix/PC-000
[PC-000] DateTime 파싱이 잘못되고 있던 것 수정
2 parents 6563b04 + b3d38dd commit 812f43b

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

app/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ android {
1212
namespace = "com.puzzle.piece"
1313

1414
defaultConfig {
15-
versionCode = 19
16-
versionName = "1.0.18"
15+
versionCode = 20
16+
versionName = "1.0.19"
1717
targetSdk = 35
1818

1919
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"

core/network/src/main/java/com/puzzle/network/model/user/GetBlockSyncTimeResponse.kt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@ package com.puzzle.network.model.user
22

33
import kotlinx.serialization.Serializable
44
import java.time.LocalDateTime
5+
import java.time.OffsetDateTime
56
import java.time.format.DateTimeFormatter
67

78
@Serializable
89
data class GetBlockSyncTimeResponse(
910
val syncTime: String?,
1011
) {
11-
fun toDomain(): LocalDateTime = syncTime?.let {
12-
LocalDateTime.parse(it, DateTimeFormatter.ISO_LOCAL_DATE_TIME)
13-
} ?: LocalDateTime.MIN
12+
fun toDomain(): LocalDateTime = syncTime
13+
?.let { OffsetDateTime.parse(it, DateTimeFormatter.ISO_OFFSET_DATE_TIME) }
14+
?.toLocalDateTime()
15+
?: LocalDateTime.MIN
1416
}

0 commit comments

Comments
 (0)