diff options
author | Jacob Keeler <jacob.keeler@livioradio.com> | 2018-09-04 10:00:12 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-04 10:00:12 -0400 |
commit | 04893693053bd1d1fd49aaf0d9510a57fde9fc8f (patch) | |
tree | adc440ca6fb5d5bcd1a6b12c545d3b466a20e1e0 | |
parent | 95aa2d64a495f250a74fc23efe2cae5ce35c51d2 (diff) | |
parent | 6d3f840eb03f1585c4e77f2e15a909378d0cadb1 (diff) | |
download | sdl_core-04893693053bd1d1fd49aaf0d9510a57fde9fc8f.tar.gz |
Merge pull request #2559 from LitvinenkoIra/fix/external_policy_build
fixup! remove struct timeval and use boost time_duration instead
3 files changed, 3 insertions, 3 deletions
diff --git a/src/components/policy/policy_external/src/policy_manager_impl.cc b/src/components/policy/policy_external/src/policy_manager_impl.cc index c7d814e56e..e2b0d6524f 100644 --- a/src/components/policy/policy_external/src/policy_manager_impl.cc +++ b/src/components/policy/policy_external/src/policy_manager_impl.cc @@ -1498,7 +1498,7 @@ bool PolicyManagerImpl::ExceededDays() { date_time::TimeDuration current_time = date_time::getCurrentTime(); const int kSecondsInDay = 60 * 60 * 24; - const int days = current_time.tv_sec / kSecondsInDay; + const int days = date_time::getSecs(current_time) / kSecondsInDay; DCHECK(std::numeric_limits<uint16_t>::max() >= days); diff --git a/src/components/policy/policy_external/test/policy_manager_impl_ptu_test.cc b/src/components/policy/policy_external/test/policy_manager_impl_ptu_test.cc index 8d2802c831..dd9b43d53c 100644 --- a/src/components/policy/policy_external/test/policy_manager_impl_ptu_test.cc +++ b/src/components/policy/policy_external/test/policy_manager_impl_ptu_test.cc @@ -926,7 +926,7 @@ TEST_F( uint32_t GetCurrentDaysCount() { date_time::TimeDuration current_time = date_time::getCurrentTime(); const uint32_t kSecondsInDay = 60 * 60 * 24; - return current_time.tv_sec / kSecondsInDay; + return date_time::getSecs(current_time) / kSecondsInDay; } TEST_F(PolicyManagerImplTest2, diff --git a/src/components/policy/policy_external/test/policy_manager_impl_user_consent_test.cc b/src/components/policy/policy_external/test/policy_manager_impl_user_consent_test.cc index 4df4012ad3..93cfa36277 100644 --- a/src/components/policy/policy_external/test/policy_manager_impl_user_consent_test.cc +++ b/src/components/policy/policy_external/test/policy_manager_impl_user_consent_test.cc @@ -71,7 +71,7 @@ TEST_F( const date_time::TimeDuration current_time = date_time::getCurrentTime(); const int kSecondsInDay = 60 * 60 * 24; - const int days_after_epoch = current_time.tv_sec / kSecondsInDay; + const int days_after_epoch = date_time::getSecs(current_time) / kSecondsInDay; policy_manager_->PTUpdatedAt(DAYS_AFTER_EPOCH, days_after_epoch); policy_manager_->PTUpdatedAt(KILOMETERS, 1000); |