PHPackages                             austinsmorris/doctrine-dbal-datetimeutc - 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. austinsmorris/doctrine-dbal-datetimeutc

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

austinsmorris/doctrine-dbal-datetimeutc
=======================================

A custom Doctine DBAL type to use PHP DateTime objects set to the UTC timezone.

2.0.0(10y ago)7135.5k↓73.3%11MITPHPPHP &gt;=5.5CI failing

Since Nov 27Pushed 5y ago1 watchersCompare

[ Source](https://github.com/austinsmorris/doctrine-dbal-datetimeutc)[ Packagist](https://packagist.org/packages/austinsmorris/doctrine-dbal-datetimeutc)[ RSS](/packages/austinsmorris-doctrine-dbal-datetimeutc/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (2)Versions (3)Used By (1)

doctrine-dbal-datetimeutc
=========================

[](#doctrine-dbal-datetimeutc)

[![Build Status](https://camo.githubusercontent.com/43dd6fb0a71668d0b1d6c2994e35fa8073e246c835fbdcfc6e0c4f4409c83f5e/68747470733a2f2f7472617669732d63692e6f72672f61757374696e736d6f727269732f646f637472696e652d6462616c2d6461746574696d657574632e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/austinsmorris/doctrine-dbal-datetimeutc)

A Doctine DBAL [Custom Mapping Type](http://docs.doctrine-project.org/projects/doctrine-orm/en/latest/cookbook/custom-mapping-types.html) allowing the use of PHP DateTime objects automatically set to the UTC timezone.

Databases [suck at timezones](http://derickrethans.nl/storing-date-time-in-database.html). The best way to deal with this is to store the date and time in UTC and seperately store the timezone that should be used for display purposes. By default, PHP will create DateTime objects set the server's timezone. This custom type overrides this to set the timezone to UTC, allowing you to later convert to the proper timezone for display.

Install via composer:

```
composer require austinsmorris/doctrine-dbal-datetimeutc:~1.0

```

Add the custom type before instantiating your entity manager:

```
use Doctrine\DBAL\Types\Type;
Type::addType('datetimeutc', 'ASM\Doctrine\DBAL\Types\DateTimeUTCType');
```

Enjoy!

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 76.5% 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 ~453 days

Total

2

Last Release

3783d ago

Major Versions

1.0.0 → 2.0.02016-02-24

PHP version history (2 changes)1.0.0PHP &gt;=5.3.2

2.0.0PHP &gt;=5.5

### Community

Maintainers

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

---

Top Contributors

[![austinsmorris](https://avatars.githubusercontent.com/u/1616868?v=4)](https://github.com/austinsmorris "austinsmorris (13 commits)")[![mrkrstphr](https://avatars.githubusercontent.com/u/164472?v=4)](https://github.com/mrkrstphr "mrkrstphr (4 commits)")

---

Tags

doctrinedbaldatetimeutc

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/austinsmorris-doctrine-dbal-datetimeutc/health.svg)

```
[![Health](https://phpackages.com/badges/austinsmorris-doctrine-dbal-datetimeutc/health.svg)](https://phpackages.com/packages/austinsmorris-doctrine-dbal-datetimeutc)
```

###  Alternatives

[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.

4585.8M4](/packages/martin-georgiev-postgresql-for-doctrine)[flow-php/doctrine-dbal-bulk

Bulk inserts and updates for Doctrine DBAL

14385.8k4](/packages/flow-php-doctrine-dbal-bulk)[vasek-purchart/doctrine-date-time-immutable-types

Doctrine DateTimeImmutable types

45230.0k](/packages/vasek-purchart-doctrine-date-time-immutable-types)[sllh/doctrine-dbal-utc-datetime

UTC DateTime type for Doctrine DBAL

1137.3k](/packages/sllh-doctrine-dbal-utc-datetime)[vasek-purchart/doctrine-date-time-immutable-types-bundle

Bundle integration of Doctrine DateTimeImmutable types for Symfony

1085.6k](/packages/vasek-purchart-doctrine-date-time-immutable-types-bundle)[jawira/db-draw

📐 Takes a DoctrineORM connection and generates a database diagram in .puml format

22113.6k3](/packages/jawira-db-draw)

PHPackages © 2026

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