replace atol with atoll to fix result size display bug. Also use atoll for time conversions, 2032 is coming...

This commit is contained in:
"Jean-Francois Dockes ext:(%22)
2013-04-04 20:01:31 +02:00
parent 98528d3203
commit 321978bfea
7 changed files with 16 additions and 16 deletions
+1 -1
View File
@@ -612,7 +612,7 @@ void Preview::setCurTabProps(const Rcl::Doc &doc, int docnum)
datebuf[0] = 0;
if (!doc.fmtime.empty() || !doc.dmtime.empty()) {
time_t mtime = doc.dmtime.empty() ?
atol(doc.fmtime.c_str()) : atol(doc.dmtime.c_str());
atoll(doc.fmtime.c_str()) : atoll(doc.dmtime.c_str());
struct tm *tm = localtime(&mtime);
strftime(datebuf, 99, "%Y-%m-%d %H:%M:%S", tm);
}
+2 -2
View File
@@ -184,7 +184,7 @@ static string dategetter(const string&, const Rcl::Doc& doc)
datebuf[0] = 0;
if (!doc.dmtime.empty() || !doc.fmtime.empty()) {
time_t mtime = doc.dmtime.empty() ?
atol(doc.fmtime.c_str()) : atol(doc.dmtime.c_str());
atoll(doc.fmtime.c_str()) : atoll(doc.dmtime.c_str());
struct tm *tm = localtime(&mtime);
strftime(datebuf, 99, "%Y-%m-%d", tm);
}
@@ -197,7 +197,7 @@ static string datetimegetter(const string&, const Rcl::Doc& doc)
datebuf[0] = 0;
if (!doc.dmtime.empty() || !doc.fmtime.empty()) {
time_t mtime = doc.dmtime.empty() ?
atol(doc.fmtime.c_str()) : atol(doc.dmtime.c_str());
atoll(doc.fmtime.c_str()) : atoll(doc.dmtime.c_str());
struct tm *tm = localtime(&mtime);
strftime(datebuf, 99, "%Y-%m-%d %H:%M:%S %z", tm);
}