Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Ensure faces timeline day key uses local date

laurenspriem278e7c9d6ea6
diff --git a/mobile/apps/photos/lib/services/faces_timeline/faces_timeline_service.dart b/mobile/apps/photos/lib/services/faces_timeline/faces_timeline_service.dart
index 9943760c8f..ae356f7276 100644
--- a/mobile/apps/photos/lib/services/faces_timeline/faces_timeline_service.dart
+++ b/mobile/apps/photos/lib/services/faces_timeline/faces_timeline_service.dart
@@ -600,5 +600,6 @@ int _compareFaceQuality(_TimelineFaceData a, _TimelineFaceData b) {
}
int _dayKeyForMicros(int micros) {
- return micros ~/ Duration.microsecondsPerDay;
+ final localDate = DateTime.fromMicrosecondsSinceEpoch(micros);
+ return localDate.year * 10000 + localDate.month * 100 + localDate.day;
}