SetTime_t: Use the sign-fixed modulo we computed

* In C++03 and earlier, the sign of the modulo result is implementation
defined (this was fixed in C++11).
* Setting a negative time is not what we want here, so make sure we use
the proper value.
This commit is contained in:
Adrien Destugues
2014-06-16 08:46:56 +02:00
parent 20929296c9
commit dbd4f8c46b
+1 -1
View File
@@ -1410,7 +1410,7 @@ BDateTime::SetTime_t(time_t seconds)
}
BTime time;
time.AddSeconds(seconds % kSecondsPerDay);
time.AddSeconds(timePart);
fTime.SetTime(time);
BDate date(1970, 1, 1);