Skip to content
This repository was archived by the owner on Aug 29, 2025. It is now read-only.

Commit 7c2a992

Browse files
committed
Fix date formatting
1 parent 235a187 commit 7c2a992

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

ScopedStorage/app/src/main/java/com/samples/storage/mediastore/AddDocumentViewModel.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,8 @@ class AddDocumentViewModel(
361361
filename = cursor.getString(displayNameColumn),
362362
size = cursor.getLong(sizeColumn),
363363
mimeType = cursor.getString(mimeTypeColumn),
364-
addedAt = cursor.getLong(dateAddedColumn),
364+
// FileColumns.DATE_ADDED is in seconds, not milliseconds
365+
addedAt = cursor.getLong(dateAddedColumn) * 1000,
365366
path = cursor.getString(dataColumn),
366367
)
367368
}

0 commit comments

Comments
 (0)