Fixed time appearance in thumbnail view (now shows leading zeroes in min and sec)

This commit is contained in:
Ilia Popov
2010-05-15 16:08:35 +02:00
parent c7fc00080b
commit 422aaacaac

View File

@@ -19,6 +19,7 @@
#include <multilangmgr.h> #include <multilangmgr.h>
#include <thumbnail.h> #include <thumbnail.h>
#include <sstream> #include <sstream>
#include <iomanip>
#include <options.h> #include <options.h>
#include <mytime.h> #include <mytime.h>
#include <stdio.h> #include <stdio.h>
@@ -286,7 +287,10 @@ void Thumbnail::generateExifDateTimeStrings () {
ostr << (char)dateFormat[i]; ostr << (char)dateFormat[i];
spec = false; spec = false;
} }
ostr << " " << (int)cfs.hour << ":" << (int)cfs.min << ":" << (int)cfs.sec;
ostr << " " << (int)cfs.hour;
ostr << ":" << std::setw(2) << std::setfill('0') << (int)cfs.min;
ostr << ":" << std::setw(2) << std::setfill('0') << (int)cfs.sec;
dateTimeString = ostr.str (); dateTimeString = ostr.str ();
} }