From 4171e0c65e2746a935b1577196a9b6ef1727e1c4 Mon Sep 17 00:00:00 2001 From: Aline Bonnet Date: Mon, 4 Nov 2024 14:49:09 +0100 Subject: [PATCH] fix: add a date when an user take a picture --- lib/page/capture_page.dart | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/page/capture_page.dart b/lib/page/capture_page.dart index ca37c9c..d4613cd 100644 --- a/lib/page/capture_page.dart +++ b/lib/page/capture_page.dart @@ -217,6 +217,11 @@ class _CapturePageState extends State 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(); } }