Skip to content

satooshi/php-clock

Repository files navigation

php-clock

Build Status Coverage Status

Simple clock to get "current datetime" in your web application. "current datetime" means $_SERVER['REQUEST_TIME'].

use Satooshi\Component\Clock;

$clock = new Clock();

$datetime = $clock->getCurrentDateTime(); // -> \DateTime
$timestamp = $clock->getUnixTimestamp(); // -> 1374127307
$dbValue = "$clock"; // -> "2013-07-18 06:01:47"

Releases

No releases published

Packages

No packages published

Languages