PHPackages                             simpod/doctrine-utcdatetime - 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. [Database &amp; ORM](/categories/database)
4. /
5. simpod/doctrine-utcdatetime

ActiveLibrary[Database &amp; ORM](/categories/database)

simpod/doctrine-utcdatetime
===========================

Doctrine UTC DateTime

0.3.0(2y ago)8272.7k↑18.9%2[1 issues](https://github.com/simPod/doctrine-utcdatetime/issues)MITPHPPHP ^8.2CI passing

Since Oct 6Pushed 1mo ago2 watchersCompare

[ Source](https://github.com/simPod/doctrine-utcdatetime)[ Packagist](https://packagist.org/packages/simpod/doctrine-utcdatetime)[ GitHub Sponsors](https://github.com/simPod)[ RSS](/packages/simpod-doctrine-utcdatetime/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (7)Versions (13)Used By (0)

Doctrine UTCDateTimeType
========================

[](#doctrine-utcdatetimetype)

[![GitHub Actions](https://github.com/simPod/doctrine-utcdatetime/workflows/CI/badge.svg)](https://github.com/simPod/doctrine-utcdatetime/actions?query=workflow%3A%22CI%22+branch%3Amaster)[![Code Coverage](https://camo.githubusercontent.com/dd81c935a6eecdc1410d4b7a8e35f162d26a42b14d8c4e14b5cbccf1c1949475/68747470733a2f2f636f6465636f762e696f2f67682f73696d506f642f646f637472696e652d7574636461746574696d652f6272616e63682f6d61737465722f67726170682f62616467652e737667)](https://codecov.io/gh/simPod/doctrine-utcdatetime/branch/master)[![Downloads](https://camo.githubusercontent.com/2a816cc46d069d89a31c989073b3d418a9c725a347c3efe9c83e1e47f3620618/68747470733a2f2f706f7365722e707567782e6f72672f73696d506f642f646f637472696e652d7574636461746574696d652f642f746f74616c2e737667)](https://packagist.org/packages/simPod/doctrine-utcdatetime)[![Packagist](https://camo.githubusercontent.com/8e218466566966f03142e3943e8650115370d7479b1e9847500a264a9ac9e8a8/68747470733a2f2f706f7365722e707567782e6f72672f73696d506f642f646f637472696e652d7574636461746574696d652f762f737461626c652e737667)](https://packagist.org/packages/simPod/doctrine-utcdatetime)

Contains DateTime and DateTimeImmutable Doctrine DBAL types that store datetimes in UTC timezone (`TIMESTAMP` type in postgres).

For more detailed explanation see [Doctrine ORM docs](https://www.doctrine-project.org/projects/doctrine-orm/en/2.6/cookbook/working-with-datetime.html#handling-different-timezones-with-the-datetime-type) and [this comment](https://github.com/simPod/doctrine-utcdatetime/issues/6#issuecomment-722343092).

For more info about usage in Doctrine ORM see [Doctrine documentation](https://www.doctrine-project.org/projects/doctrine-orm/en/2.6/cookbook/working-with-datetime.html). The code is mostly copied from there.

Using the UTCDateTimeType
-------------------------

[](#using-the-utcdatetimetype)

### Installation

[](#installation)

```
composer require simpod/doctrine-utcdatetime
```

### Overriding default types in Symfony

[](#overriding-default-types-in-symfony)

Simply copied from DoctrineExtensions' documentation:

```
doctrine:
    dbal:
        types:
            datetime: SimPod\DoctrineUtcDateTime\UTCDateTimeType
            datetimetz: SimPod\DoctrineUtcDateTime\UTCDateTimeType
            datetime_immutable: SimPod\DoctrineUtcDateTime\UTCDateTimeImmutableType
            datetimetz_immutable: SimPod\DoctrineUtcDateTime\UTCDateTimeImmutableType
```

###  Health Score

49

—

FairBetter than 95% of packages

Maintenance56

Moderate activity, may be stable

Popularity41

Moderate usage in the ecosystem

Community15

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 52.6% 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 ~226 days

Recently: every ~213 days

Total

8

Last Release

835d ago

PHP version history (5 changes)v0.1.0PHP ^7.2

v0.1.2PHP ^7.4 || ^8.0

0.1.4PHP ^8.0

0.2.1PHP ^8.1

0.3.0PHP ^8.2

### Community

Maintainers

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

---

Top Contributors

[![simPod](https://avatars.githubusercontent.com/u/327717?v=4)](https://github.com/simPod "simPod (41 commits)")[![renovate[bot]](https://avatars.githubusercontent.com/in/2740?v=4)](https://github.com/renovate[bot] "renovate[bot] (28 commits)")[![renovate-bot](https://avatars.githubusercontent.com/u/25180681?v=4)](https://github.com/renovate-bot "renovate-bot (5 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (1 commits)")

---

Tags

datetimedoctrinedoctrine-dbaldoctrine-ormimmutableormphputcdatetime

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/simpod-doctrine-utcdatetime/health.svg)

```
[![Health](https://phpackages.com/badges/simpod-doctrine-utcdatetime/health.svg)](https://phpackages.com/packages/simpod-doctrine-utcdatetime)
```

###  Alternatives

[scienta/doctrine-json-functions

A set of extensions to Doctrine that add support for json query functions.

58723.9M36](/packages/scienta-doctrine-json-functions)[martin-georgiev/postgresql-for-doctrine

Extends Doctrine with native PostgreSQL support for arrays, JSONB, ranges, PostGIS geometries, text search, ltree, uuid, and 100+ PostgreSQL-specific functions.

4485.3M4](/packages/martin-georgiev-postgresql-for-doctrine)[damienharper/auditor-bundle

Integrate auditor library in your Symfony projects.

4542.8M](/packages/damienharper-auditor-bundle)[sonata-project/entity-audit-bundle

Audit for Doctrine Entities

644989.8k1](/packages/sonata-project-entity-audit-bundle)[overtrue/laravel-versionable

Make Laravel model versionable.

585308.0k5](/packages/overtrue-laravel-versionable)[worksome/foggy

Foggy is a tool for making database dumps with some data removed/changed.

26571.7k1](/packages/worksome-foggy)

PHPackages © 2026

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