in reply to Re^2: Converting to GPS time
in thread Converting to GPS time
You can calculate the GPS leap second offset with DateTime::LeapSecond.
perl -e 'use lib qw{lib}; use DateTime::LeapSecond; print DateTime::LeapSecond::leap_seconds( (DateTime->now->utc_rd_value +s)[0] ) - DateTime::LeapSecond::leap_seconds( (DateTime->new(qw{year 1980 +month 1 day 6 time_zone UTC})->utc_rd_values)[0]), "\n";'
|
|---|