diff --git a/tudatpy/kernel/expose_astro/expose_time_conversion.cpp b/tudatpy/kernel/expose_astro/expose_time_conversion.cpp index 646bc1d1..85ef03c5 100644 --- a/tudatpy/kernel/expose_astro/expose_time_conversion.cpp +++ b/tudatpy/kernel/expose_astro/expose_time_conversion.cpp @@ -38,15 +38,23 @@ tba::DateTime timePointToDateTime(const std::chrono::system_clock::time_point da { std::time_t tt = std::chrono::system_clock::to_time_t(datetime); std::tm local_tm = *localtime(&tt); + std::cout<<"Input time decomposed " + <(datetime.time_since_epoch()); + microseconds timeInSeconds = duration_cast(datetime.time_since_epoch()); + + long long fractional_seconds = timeInMicroSeconds.count() % 1000000LL; + std::cout<<"Microseconds "<( local_tm.tm_sec ) + static_cast< long double >( fractional_seconds ) / - tudat::mathematical_constants::getFloatingInteger< long double >( 1000000 ) ); + tudat::mathematical_constants::getFloatingInteger< long double >( 1000000LL ) ); } // Convert from Gregorian date to time_point (Python datetime). Only year/month/day, no time.