PHP code example of amaccis / tai64-datetime
1. Go to this page and download the library: Download amaccis/tai64-datetime library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
amaccis / tai64-datetime example snippets
use Amaccis/Tai64DateTime/DateTime
$dateTime = new DateTime("400000002a2b2c2d");
$utc = $dateTime->format('Y-m-d H:i:s');
var_dump($utc); // 1992-06-02 08:06:43
use Amaccis/Tai64DateTime/DateTime
$dateTime = new DateTime("1992-06-02 08:06:43");
$hexString = $dateTime->format("TAI64");
var_dump($hexString); // 400000002a2b2c2d'