From cd98e4f6dbe0a9d8731bfd5c7bf506ae73f07877 Mon Sep 17 00:00:00 2001 From: Miika Turkia Date: Sat, 26 Apr 2014 10:56:29 +0300 Subject: Use original time if available on image loading DateTimeOriginal should be used as first option when loading images. When images are modified, the original time should be retained, but the DateTime will change to the edit time. See #495 Signed-off-by: Miika Turkia Signed-off-by: Dirk Hohndel --- qt-ui/simplewidgets.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/qt-ui/simplewidgets.cpp b/qt-ui/simplewidgets.cpp index e6720509f..7335f9aa0 100644 --- a/qt-ui/simplewidgets.cpp +++ b/qt-ui/simplewidgets.cpp @@ -240,9 +240,9 @@ time_t ShiftImageTimesDialog::epochFromExiv(EXIFInfo *exif) int year, month, day, hour, min, sec; if (strlen(exif->DateTime.c_str())) - sscanf(exif->DateTime.c_str(), "%d:%d:%d %d:%d:%d", &year, &month, &day, &hour, &min, &sec); - else sscanf(exif->DateTimeOriginal.c_str(), "%d:%d:%d %d:%d:%d", &year, &month, &day, &hour, &min, &sec); + else + sscanf(exif->DateTime.c_str(), "%d:%d:%d %d:%d:%d", &year, &month, &day, &hour, &min, &sec); tm.tm_year = year; tm.tm_mon = month - 1; tm.tm_mday = day; -- cgit v1.2.3-70-g09d2