Commit abf425ca authored by Cédric Traizet's avatar Cédric Traizet

BUG: fix uninitialized variable tm_isdst when reading otb::Time from string...

BUG: fix uninitialized variable tm_isdst when reading otb::Time from string (Daylight Saving Time is disabled)
parent 2c6c4261
Pipeline #7150 passed with stages
in 79 minutes and 37 seconds
......@@ -184,6 +184,9 @@ std::istream& operator>>(std::istream& is, Time& val)
val.frac_sec = sec - (double) val.tm_sec;
_OTB_ISTREAM_FAIL_IF( val.tm_sec < 0 || val.tm_sec > 60 )
_OTB_ISTREAM_FAIL_IF( val.frac_sec < 0.0 || val.frac_sec >= 1.0)
// Disable Daylight Saving Time
val.tm_isdst = 0;
if (!is.eof())
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment