fork(1) download
  1. #!/usr/bin/env python3
  2. from datetime import datetime, timedelta
  3.  
  4. tai_posix_epoch = datetime(1970, 1, 1) + timedelta(seconds=8, microseconds=82)
  5. tai_gps_epoch = datetime(1980, 1, 6) + timedelta(seconds=19)
  6. print(int(round((tai_gps_epoch - tai_posix_epoch) / timedelta(seconds=1))))
Success #stdin #stdout 0.06s 11264KB
stdin
Standard input is empty
stdout
315964811