Skip to content

Commit

Permalink
fix: add a date when an user take a picture
Browse files Browse the repository at this point in the history
  • Loading branch information
Aline Bonnet authored and OtterWays committed Nov 15, 2024
1 parent 5c779db commit 4171e0c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/page/capture_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,11 @@ class _CapturePageState extends State<CapturePage> with WidgetsBindingObserver {
await exif.setLatLong(
currentLocation.latitude, currentLocation.longitude);
await exif.setAltitude(currentLocation.altitude);

DateTime now = DateTime.now().toUtc();
String formattedDate = DateFormat('yyyy:MM:dd HH:mm:ss').format(now);

exif.setAttribute('GPSDateTime', formattedDate);
await exif.saveAttributes();
}
}
Expand Down

0 comments on commit 4171e0c

Please sign in to comment.