Skip to content

Commit 93d9a6a

Browse files
gromandreasjengelh
authored andcommitted
ews: fix offset calculation in sTimePoint
The offset sign was inverted in its calculation resulting into wrong time calculation using the offset. References: GXH-112
1 parent 8f92af2 commit 93d9a6a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

exch/ews/structures.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1235,7 +1235,7 @@ sTimePoint::sTimePoint(const char* dtstr)
12351235
throw EWSError::ValueOutOfRange(E3152);
12361236
time = clock::from_time_t(timestamp);
12371237
time += std::chrono::duration_cast<time_point::duration>(std::chrono::duration<double>(seconds));
1238-
offset = std::chrono::minutes(60*tz_hour+(tz_hour < 0? -tz_min : tz_min));
1238+
offset = std::chrono::minutes(60 * (-tz_hour) + (tz_hour > 0 ? -tz_min : tz_min));
12391239
if(strlen(dtstr) == 19)
12401240
calcOffset = true;
12411241
}

0 commit comments

Comments
 (0)