PHPackages                             amaccis/tai64-datetime - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. amaccis/tai64-datetime

Abandoned → [amaccis/datetai](/?search=amaccis%2Fdatetai)Library[Utility &amp; Helpers](/categories/utility)

amaccis/tai64-datetime
======================

A PHP library that extends DateTime class, in order to allow to handle Tai64.

1.0.1(6y ago)08MITPHPPHP ^7.1CI failing

Since Sep 28Pushed 3y agoCompare

[ Source](https://github.com/amaccis/tai64-datetime)[ Packagist](https://packagist.org/packages/amaccis/tai64-datetime)[ RSS](/packages/amaccis-tai64-datetime/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (4)Used By (0)

TAI64-DateTime
==============

[](#tai64-datetime)

[![PHP Version](https://camo.githubusercontent.com/2dcf2757d7a2ae7d144c6e7d9b63bd3383509e6b70bacccb3bd8ad04d1c2541c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545372e312d626c75652e737667)](https://img.shields.io/badge/php-%5E7.1-blue.svg)

[![Build Status](https://camo.githubusercontent.com/453fc7fb760488d3df356d9471a1563b413287947cbed08cdc65a364e7d68410/68747470733a2f2f7472617669732d63692e6f72672f616d61636369732f74616936342d6461746574696d652e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/amaccis/tai64-datetime)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/54062fb115169bf1f9e01818a65f1addbbe88a3adb43e19409c949c236c28e48/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f616d61636369732f74616936342d6461746574696d652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/amaccis/tai64-datetime/?branch=master)

A PHP library that extends DateTime class, in order to allow to handle Tai64.

Installation
------------

[](#installation)

Package is available on [Packagist](http://packagist.org/packages/amaccis/tai64-datetime), you can install it using [Composer](http://getcomposer.org).

```
composer require amaccis/tai64-datetime
```

Basic usage
-----------

[](#basic-usage)

If you feel to need a basic knowledge of TAI, TAI64, TAI64N and TAI64NA, [read this](https://cr.yp.to/libtai/tai64.html). Instead, to know more about leap seconds, [read this](http://maia.usno.navy.mil/leapsec.html). TAI64N and TAI64NA are not currently managed.

### Convert TAI64 into UTC

[](#convert-tai64-into-utc)

```
    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
```

### Convert UTC into TAI64

[](#convert-utc-into-tai64)

```
    use Amaccis/Tai64DateTime/DateTime

    $dateTime = new DateTime("1992-06-02 08:06:43");
    $hexString = $dateTime->format("TAI64");
    var_dump($hexString); // 400000002a2b2c2d'
```

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

3

Last Release

2412d ago

Major Versions

0.9 → 1.02019-09-28

### Community

Maintainers

![](https://www.gravatar.com/avatar/f7bad154688f2c03427e4224e14f3fa44e383c2c0cda2575969428e355590c1c?d=identicon)[amaccis](/maintainers/amaccis)

---

Top Contributors

[![amaccis](https://avatars.githubusercontent.com/u/15266603?v=4)](https://github.com/amaccis "amaccis (14 commits)")

---

Tags

datetimetimedateTAI64TAI64NTAI64NA

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/amaccis-tai64-datetime/health.svg)

```
[![Health](https://phpackages.com/badges/amaccis-tai64-datetime/health.svg)](https://phpackages.com/packages/amaccis-tai64-datetime)
```

###  Alternatives

[league/period

Time range API for PHP

7335.4M21](/packages/league-period)[brick/date-time

Date and time library

3623.3M60](/packages/brick-date-time)[aeon-php/calendar

PHP type safe, immutable calendar library

2079.7M16](/packages/aeon-php-calendar)[tplaner/when

Date/Calendar recursion library.

5261.0M5](/packages/tplaner-when)[kartik-v/php-date-formatter

A Javascript datetime formatting and manipulation library using PHP date-time formats.

461.5M3](/packages/kartik-v-php-date-formatter)[dater/dater

Compact PHP library for working with date/time in different formats &amp; timezones.

14282.3k](/packages/dater-dater)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
