summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@users.sourceforge.net>2010-10-06 15:45:04 +0200
committerTomas Bzatek <tbzatek@users.sourceforge.net>2010-10-06 15:45:04 +0200
commit5079886a688cdc0588f8979efa57554e47c3c5ef (patch)
tree1c2aed32ff3ce179d1e4b3880d629e0aa3246485
parente752364676e52b79f5cca81a5c2f8f49a5ea2daa (diff)
downloadcataract-5079886a688cdc0588f8979efa57554e47c3c5ef.tar.xz
Fix day of the week in EXIF date string
mktime() modifies tm_wday and tm_yday to correct values.
-rw-r--r--src/jpeg-utils.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/jpeg-utils.cpp b/src/jpeg-utils.cpp
index 10251e0..3bde7b6 100644
--- a/src/jpeg-utils.cpp
+++ b/src/jpeg-utils.cpp
@@ -81,6 +81,7 @@ get_exif (const gchar *filename, TExifData **exif_data)
{
tt.tm_year -= 1900;
tt.tm_mon--;
+ mktime (&tt);
if (strftime (&conv[0], sizeof (conv), "%c", &tt))
data->datetime = g_strdup (&conv[0]);
}