[iOS] fix wrong dates passed to booking api

This commit is contained in:
Aleksey Belousov 2020-08-18 16:30:12 +03:00 committed by Alexander Boriskov
parent 0738712a26
commit f654f3f0ce

View file

@ -158,8 +158,9 @@ unsigned makeMask(std::unordered_set<ftypes::IsHotelChecker::Type> const &items)
auto &orderingParams = params.m_orderingParams;
orderingParams.m_rooms = filterRooms;
orderingParams.m_checkin = Clock::from_time_t(self.checkInDate.timeIntervalSince1970);
orderingParams.m_checkout = Clock::from_time_t(self.checkOutDate.timeIntervalSince1970);
NSInteger secondsFromGMT = NSTimeZone.systemTimeZone.secondsFromGMT;
orderingParams.m_checkin = Clock::from_time_t(self.checkInDate.timeIntervalSince1970 - secondsFromGMT);
orderingParams.m_checkout = Clock::from_time_t(self.checkOutDate.timeIntervalSince1970 - secondsFromGMT);
}
return {std::make_shared<booking::AvailabilityParams>(params), {}};
}