me-ruhin/timezonify

PHP package to convert date/time strings or timestamps to a custom timezone

Installs: 7

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/me-ruhin/timezonify

v1.0.1 2024-06-26 11:44 UTC

This package is auto-updated.

Last update: 2025-12-26 15:17:07 UTC


README

Timezonify is a PHP package to convert date/time strings or timestamps to a custom timezone.

Installation

Use Composer to install the package:

composer require me-ruhin/timezonify
<?php

require_once 'vendor/autoload.php'; // Load Composer's autoloader

use DateConverter\DateConverter;

// Example usage
$dateTimeString = '2024-06-26 15:30:00';
$timestamp = strtotime($dateTimeString);

$convertedDateTime = DateConverter::convertToTimezone($dateTimeString, 'America/New_York');
$convertedTimestamp = DateConverter::convertToTimezone($timestamp, 'America/New_York');

echo "Converted DateTime String: $convertedDateTime\n";
echo "Converted Timestamp: $convertedTimestamp\n";