We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d74593 commit 5460482Copy full SHA for 5460482
android/app/src/main/java/com/emergetools/hackernews/features/comments/CommentsDomain.kt
@@ -23,6 +23,7 @@ import kotlinx.coroutines.flow.update
23
import kotlinx.coroutines.launch
24
import java.time.LocalDateTime
25
import java.time.ZoneOffset
26
+import java.time.format.DateTimeFormatter
27
28
sealed interface CommentsState {
29
val headerState: HeaderState
@@ -354,7 +355,8 @@ class CommentsViewModel(
354
355
author = user,
356
content = text,
357
timeLabel = relativeTimeStamp(
- epochSeconds = LocalDateTime.parse(age)
358
+ epochSeconds = LocalDateTime
359
+ .parse(age, DateTimeFormatter.ISO_DATE_TIME)
360
.toInstant(ZoneOffset.UTC).epochSecond
361
),
362
upvoted = upvoted,
0 commit comments