Skip to content

mmerian/doctrine-timestamp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ff0de51 · Feb 24, 2018

History

15 Commits
Feb 24, 2018
Dec 21, 2013
Feb 3, 2014
Dec 21, 2013

Repository files navigation

doctrine-timestamp

Implementation of a timestamp type for the Doctrine DBAL

This library maps the DateTime PHP class to a Unix timestamp (integer) in the database.

Installation

Just add this to your composer.json

{
  "require": {
    "mmerian/doctrine-timestamp": "dev-master"
  }
}

Then, when bootstraping your doctrine connection :

Type::addType('timestamp', 'DoctrineTimestamp\DBAL\Types\Timestamp');
$conn->getDatabasePlatform()->registerDoctrineTypeMapping('Timestamp', 'timestamp');

About

Implementation of a timestamp type for the Doctrine DBAL

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages