2017 © Pedro PelĂĄez
 

library doctrine-dbal-utc-datetime

UTC DateTime type for Doctrine DBAL

image

sllh/doctrine-dbal-utc-datetime

UTC DateTime type for Doctrine DBAL

  • Monday, September 25, 2017
  • by Soullivaneuh
  • Repository
  • 1 Watchers
  • 9 Stars
  • 1,344 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 2 Versions
  • 17 % Grown

The README.md

Doctrine DBAL UTC DateTime

UTC DateTime type for Doctrine DBAL., (*1)

Latest Stable Version Latest Unstable Version License, (*2)

Total Downloads Monthly Downloads Daily Downloads, (*3)

Build Status Coverage Status, (*4)

Why this DBAL Type?

This special type allow you to be sure to always save any DateTime to the UTC format., (*5)

The goal is to get rid of the quite hazardous timezone management of many database vendors., (*6)

For more information, please read the official Doctrine wiki page, where this class come from., (*7)

Setup

First of all, you need to require this library through composer:, (*8)

``` bash composer require sllh/doctrine-dbal-utc-datetime, (*9)


Then, replace the default `datetime` and `datetimetz` DBAL types: ```php use Doctrine\DBAL\Types\Type; use SLLH\Doctrine\DBAL\Types\UTCDateTimeType; Type::overrideType('datetime', UTCDateTimeType::class); Type::overrideType('datetimetz', UTCDateTimeType::class);

If you are using Symfony, you can override the type trough the config.yml file:, (*10)

doctrine:
    dbal:
        types:
            datetime: SLLH\Doctrine\DBAL\Types\UTCDateTimeType
            datetimetz: SLLH\Doctrine\DBAL\Types\UTCDateTimeType

And voilĂ ! You are good to go. Happy coding!, (*11)

License

This bundle is under the MIT license. See the complete license on the LICENSE file., (*12)

The Versions

25/09 2017

dev-master

9999999-dev

UTC DateTime type for Doctrine DBAL

  Sources   Download

MIT

The Requires

 

doctrine dbal datetime utc

25/09 2017

v1.0.0

1.0.0.0

UTC DateTime type for Doctrine DBAL

  Sources   Download

MIT

The Requires

 

doctrine dbal datetime utc