mirror of
https://github.com/SimpleMobileTools/Simple-Gallery.git
synced 2025-06-05 21:59:19 +02:00
fix #938, fix a glitch at fixing Date Taken value
This commit is contained in:
@ -296,7 +296,7 @@ class MediaAdapter(activity: BaseSimpleActivity, var media: MutableList<Thumbnai
|
|||||||
val paths = getSelectedPaths()
|
val paths = getSelectedPaths()
|
||||||
for (path in paths) {
|
for (path in paths) {
|
||||||
val dateTime = ExifInterface(path).getAttribute(ExifInterface.TAG_DATETIME_ORIGINAL)
|
val dateTime = ExifInterface(path).getAttribute(ExifInterface.TAG_DATETIME_ORIGINAL)
|
||||||
?: ExifInterface(path).getAttribute(ExifInterface.TAG_DATETIME)
|
?: ExifInterface(path).getAttribute(ExifInterface.TAG_DATETIME) ?: continue
|
||||||
val format = "yyyy:MM:dd kk:mm:ss"
|
val format = "yyyy:MM:dd kk:mm:ss"
|
||||||
val formatter = SimpleDateFormat(format, Locale.getDefault())
|
val formatter = SimpleDateFormat(format, Locale.getDefault())
|
||||||
val timestamp = formatter.parse(dateTime).time
|
val timestamp = formatter.parse(dateTime).time
|
||||||
|
Reference in New Issue
Block a user