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 issues](https://github.com/heiglandreas/PdoTimezoneHelper/issues)[1 PRs](https://github.com/heiglandreas/PdoTimezoneHelper/pulls)PHP

Since Sep 30Pushed 4y 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 today

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

23

—

LowBetter than 30% of packages

Maintenance13

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.2k280.5M5.5k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k114.4M86](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k51.5M8.1k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k62.7M487](/packages/mongodb-mongodb)[spatie/laravel-translatable

A trait to make an Eloquent model hold translations

2.4k22.1M345](/packages/spatie-laravel-translatable)[kirschbaum-development/eloquent-power-joins

The Laravel magic applied to joins.

1.5k23.2M24](/packages/kirschbaum-development-eloquent-power-joins)

PHPackages © 2026

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