Skip to content
This repository has been archived by the owner on Dec 5, 2024. It is now read-only.
/ py-tai64 Public archive

A simple UTC => TAI converter and hex-encoded TAI (as used by DJBDNS) => UTC datetime.datetime decoder.

License

Notifications You must be signed in to change notification settings

hinnerk/py-tai64

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tai64n

A module to convert a hex encoded tai64n string to a datetime.datetime object and to convert between TAI and UTC standard time.

Features, Bugs

  • decoding hex values from logs generated by DJBs software will generally work fine as long as the date is later than later than 01.01.1972
  • conversion of datetime.datetime() objects currenty works only from UTC to TAI
  • please use the github bug tracker for bug reports and as a extension wishlist

TAI, TAI64, TAI64n

TAI stands for Temps Atomique International, the current international real-time standard. One TAI second is defined as the duration of 9192631770 periods of the radiation corresponding to the transition between the two hyperfine levels of the ground state of the cesium atom.

http://cr.yp.to/libtai/tai64.html#tai64n

Module Functions

  • decode_tai64n("400000004a3239350292c294") — converts a 16 or 24 bytes long hex TAI64(n) string to a datetime.datetime UTC object

  • utc2tai(datetime.datetime.now()) — converts datetime.datetime UTC object to a datetime.datetime TAI object

About

A simple UTC => TAI converter and hex-encoded TAI (as used by DJBDNS) => UTC datetime.datetime decoder.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages