fix(server,web,mobile): Incorrectly record and show timestamp and time zone of the asset (#706)

Implemented a mechanism to extract the correct time zone from the GPS coordinate if presented in the file's EXIF, and to convert the timestamp to the correct UTC time so that the time will show correctly based on the mobile/web local time zone.
This commit is contained in:
Alex
2022-09-22 15:58:17 -05:00
committed by GitHub
parent fc194021a4
commit e5459b68ff
16 changed files with 392 additions and 63 deletions

View File

@@ -62,7 +62,7 @@ final searchResultGroupByDateTimeProvider = StateProvider((ref) {
(a, b) => b.compareTo(a),
);
return assets.groupListsBy(
(element) =>
DateFormat('y-MM-dd').format(DateTime.parse(element.createdAt)),
(element) => DateFormat('y-MM-dd')
.format(DateTime.parse(element.createdAt).toLocal()),
);
});