flamey has asked for the wisdom of the Perl Monks concerning the following question:
Obviously something there is wrong, but what? What's the best way to do such conversion, anyway? Many thanks in advance.use Time::GPS qw(gps_instant_to_mjd gps_mjd_to_instant); use Math::BigRat; my $x = Math::BigRat->new('915717017'); my $mjd = gps_instant_to_mjd($x); print "$mjd\n"; # 2021871299/43200 use DateTime::Format::Epoch::MJD; my $dt = DateTime::Format::Epoch::MJD->parse_datetime( $mjd ); print $dt; # 1987-01-06T00:00:00
|
|---|