diff --git a/src/actions.cpp b/src/actions.cpp index 72a0b787..8a95c212 100644 --- a/src/actions.cpp +++ b/src/actions.cpp @@ -1848,6 +1848,10 @@ namespace { if (!Util::strtol(timeStr.substr(17,2).c_str(), tmp)) return 10; tm->tm_sec = tmp; + // Conversions to set remaining fields of the tm structure + time_t time = timegm(tm); + if (time == (time_t)-1 || gmtime_r(&time, tm) == 0) return 11; + return 0; } // str2Tm diff --git a/test/bugfixes-test.sh b/test/bugfixes-test.sh index 4d765586..aadd3ac2 100755 --- a/test/bugfixes-test.sh +++ b/test/bugfixes-test.sh @@ -142,6 +142,12 @@ $exiv2 -v -M'set Exif.Image.Make NIKON' \ $exiv2 -pa -u -b $filename +num=683 +filename=exiv2-bug$num.jpg +cp -f ../data/exiv2-nikon-d70.jpg $filename +echo '------>' Bug $num '<-------' >&2 +$exiv2 -v -f -r %Y-%m-%d-%a-%j $filename + ) > $results 2>&1 # ---------------------------------------------------------------------- diff --git a/test/data/bugfixes-test.out b/test/data/bugfixes-test.out index bd0d37bc..2dc0a541 100644 Binary files a/test/data/bugfixes-test.out and b/test/data/bugfixes-test.out differ