PHPackages                             org\_heigl/pdo\_timezone\_helper - 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. org\_heigl/pdo\_timezone\_helper

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

org\_heigl/pdo\_timezone\_helper
================================

Helper for timezone-handling in databases

31.1k↓100%[1 PRs](https://github.com/heiglandreas/PdoTimezoneHelper/pulls)PHP

Since Sep 30Pushed 5y ago1 watchersCompare

[ Source](https://github.com/heiglandreas/PdoTimezoneHelper)[ Packagist](https://packagist.org/packages/org_heigl/pdo_timezone_helper)[ RSS](/packages/org-heigl-pdo-timezone-helper/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

PdoTimezoneHelper
=================

[](#pdotimezonehelper)

[![Build Status](https://camo.githubusercontent.com/69abd1c538880d976c32612d64b1e9ba1522f9ba58fe03fb0c8482bb81009d46/68747470733a2f2f7472617669732d63692e6f72672f686569676c616e64726561732f50646f54696d657a6f6e6548656c7065722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/heiglandreas/PdoTimezoneHelper)[![Coverage Status](https://camo.githubusercontent.com/7b2a5ddcce14323b64836473abf8d2d68be5b6619513e97c21366ceea9f8f099/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f686569676c616e64726561732f50646f54696d657a6f6e6548656c7065722f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/github/heiglandreas/PdoTimezoneHelper?branch=master)

A small library to ease handling of timezones with PDO

Usage
-----

[](#usage)

This lib provides a helper that creates database-specific code to get a UTC-datetime from a DateTime-Entry and a timezone entry in your table.

You can store your datetimes in the database with or without an offset but with a timezone and this helper will create a UTC-Datetime from it for comparisons

```
$helper = new PdoTimezoneHelper::create($pdoObject);
$helper->setTimezoneField($field);

echo sprintf(
    "SELECT * FROM table WHERE %1$s < '2016-12-31T23:59:59'",
    $helper->getUtcDateTime($dateTimeField);
```

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

[](#installation)

This lib is best installed using [composer](https://getcomposer.org):

```
composer require org_heigl/pdo_timezone_helper
```

References:
-----------

[](#references)

-
-

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity43

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/5ae5183aaad2bc7453230704bd6991dc6ccbcd6e775c6a29efdc94350a69f247?d=identicon)[heiglandreas](/maintainers/heiglandreas)

---

Top Contributors

[![heiglandreas](https://avatars.githubusercontent.com/u/91998?v=4)](https://github.com/heiglandreas "heiglandreas (16 commits)")

### Embed Badge

![Health badge](/badges/org-heigl-pdo-timezone-helper/health.svg)

```
[![Health](https://phpackages.com/badges/org-heigl-pdo-timezone-helper/health.svg)](https://phpackages.com/packages/org-heigl-pdo-timezone-helper)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.3k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M543](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M209](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

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