PHPackages                             abdulsametsahin/php-timezone-converter - 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. abdulsametsahin/php-timezone-converter

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

abdulsametsahin/php-timezone-converter
======================================

A PHP utility library for seamless conversion between Windows and IANA timezones, enabling interoperability and enhancing date/time handling across different systems. Ideal for projects requiring compatibility with various timezone standards.

1.0.1(2y ago)11.9k↓50%[1 issues](https://github.com/abdulsametsahin/php-timezone-converter/issues)MITPHPPHP &gt;=7.4

Since Feb 8Pushed 2y ago1 watchersCompare

[ Source](https://github.com/abdulsametsahin/php-timezone-converter)[ Packagist](https://packagist.org/packages/abdulsametsahin/php-timezone-converter)[ RSS](/packages/abdulsametsahin-php-timezone-converter/feed)WikiDiscussions master Synced 1mo ago

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

PHP Timezone Converter
======================

[](#php-timezone-converter)

The PHP Timezone Converter is a utility library for seamless conversion between Windows and IANA (Olson) timezones, enabling interoperability and enhancing date/time handling across different systems. Ideal for projects requiring compatibility with various timezone standards, this library simplifies the conversion process, making your application more versatile and user-friendly.

Features
--------

[](#features)

- Convert from IANA (Olson) timezone to Windows timezone and vice versa.
- Simple and easy-to-use interface.
- Supports a wide range of PHP versions (&gt;=7.4).

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

[](#installation)

Use Composer to install the PHP Timezone Converter into your project:

```
composer require abdulsametsahin/php-timezone-converter
```

Usage
-----

[](#usage)

The Timezone Converter can be used statically, offering straightforward methods for conversion:

### Convert from Olson to Windows Timezone

[](#convert-from-olson-to-windows-timezone)

```
use Abdulsametsahin\TimezoneConverter\TimezoneConverter;

$windowsTimezone = TimezoneConverter::toWindows('Europe/Istanbul');
echo $windowsTimezone; // Outputs corresponding Windows timezone
```

### Convert from Windows to Olson Timezone

[](#convert-from-windows-to-olson-timezone)

```
$olsonTimezone = TimezoneConverter::toOlson('Turkey Standard Time');
echo $olsonTimezone; // Outputs 'Europe/Istanbul'
```

### Handling Invalid Timezones

[](#handling-invalid-timezones)

Both conversion methods throw an `InvalidArgumentException` if the provided timezone is invalid or not supported.

```
try {
    $invalid = TimezoneConverter::toWindows('Invalid/Timezone');
} catch (\InvalidArgumentException $e) {
    echo $e->getMessage(); // Outputs 'Invalid timezone: Invalid/Timezone'
}
```

Requirements
------------

[](#requirements)

- PHP &gt;= 7.4

Contributing
------------

[](#contributing)

Contributions are welcome! Please feel free to submit pull requests or open issues to improve the library or add more features.

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity23

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.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

821d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/93e6bafa75b4af1c23e2353c14402ceb39772fd4d329aa338ef87ebdf5134d25?d=identicon)[abdulsametsahin](/maintainers/abdulsametsahin)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/abdulsametsahin-php-timezone-converter/health.svg)

```
[![Health](https://phpackages.com/badges/abdulsametsahin-php-timezone-converter/health.svg)](https://phpackages.com/packages/abdulsametsahin-php-timezone-converter)
```

PHPackages © 2026

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