Skip to content

Commit

Permalink
more
Browse files Browse the repository at this point in the history
  • Loading branch information
xanthospap committed Jan 3, 2024
1 parent a13326e commit 47e75eb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/datetime_write.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,6 @@ const char *to_char(const hms_time<S> &hms, char *buffer) {
*/
template <YMDFormat FD, HMSFormat FT, typename S>
const char *to_char(const datetime<S> &d, char *buffer) {
printf("\tNote that the date is: %ld %ld\n", d.imjd().as_underlying_type(), d.sec().as_underlying_type());
/* write date to buffer */
ymd_date ymd(d.as_ymd());
if (SpitDate<FD>::spit(ymd, buffer) != SpitDate<FD>::numChars) {
Expand Down
5 changes: 5 additions & 0 deletions src/dtdatetime.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -614,6 +614,11 @@ class datetime {
[[nodiscard]] constexpr datetime<S> tai2gps() const noexcept {
return datetime(m_mjd, m_sec - dso::cast_to<seconds, S>(seconds(19)));
}

[[nodiscard]] constexpr datetime<S> tt2gps() const noexcept {
return datetime(m_mjd, m_sec - dso::cast_to<milliseconds, S>(
milliseconds(19000 + 32184)));
}

[[nodiscard]] constexpr datetime<S> gps2tai() const noexcept {
return datetime(m_mjd, m_sec + dso::cast_to<seconds, S>(seconds(19)));
Expand Down

0 comments on commit 47e75eb

Please sign in to comment.