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";'
In reply to Re^3: Converting to GPS time
by mrdvt92
in thread Converting to GPS time
by scitash
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |