Skip to content

Commit 5460482

Browse files
1 parent 5d74593 commit 5460482

File tree

1 file changed

+3
-1
lines changed
  • android/app/src/main/java/com/emergetools/hackernews/features/comments

1 file changed

+3
-1
lines changed

android/app/src/main/java/com/emergetools/hackernews/features/comments/CommentsDomain.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import kotlinx.coroutines.flow.update
2323
import kotlinx.coroutines.launch
2424
import java.time.LocalDateTime
2525
import java.time.ZoneOffset
26+
import java.time.format.DateTimeFormatter
2627

2728
sealed interface CommentsState {
2829
val headerState: HeaderState
@@ -354,7 +355,8 @@ class CommentsViewModel(
354355
author = user,
355356
content = text,
356357
timeLabel = relativeTimeStamp(
357-
epochSeconds = LocalDateTime.parse(age)
358+
epochSeconds = LocalDateTime
359+
.parse(age, DateTimeFormatter.ISO_DATE_TIME)
358360
.toInstant(ZoneOffset.UTC).epochSecond
359361
),
360362
upvoted = upvoted,

0 commit comments

Comments
 (0)