2017 © Pedro Peláez
 

library doctrine-dbal-datetimeutc

A custom Doctine DBAL type to use PHP DateTime objects set to the UTC timezone.

image

austinsmorris/doctrine-dbal-datetimeutc

A custom Doctine DBAL type to use PHP DateTime objects set to the UTC timezone.

  • Wednesday, February 24, 2016
  • by austinsmorris
  • Repository
  • 1 Watchers
  • 2 Stars
  • 25,206 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 3 Versions
  • 12 % Grown

The README.md

doctrine-dbal-datetimeutc

Build Status, (*1)

A Doctine DBAL Custom Mapping Type allowing the use of PHP DateTime objects automatically set to the UTC timezone., (*2)

Databases suck at timezones. The best way to deal with this is to store the date and time in UTC and seperately store the timezone that should be used for display purposes. By default, PHP will create DateTime objects set the server's timezone. This custom type overrides this to set the timezone to UTC, allowing you to later convert to the proper timezone for display., (*3)

Install via composer:, (*4)

composer require austinsmorris/doctrine-dbal-datetimeutc:~1.0

Add the custom type before instantiating your entity manager:, (*5)

use Doctrine\DBAL\Types\Type;
Type::addType('datetimeutc', 'ASM\Doctrine\DBAL\Types\DateTimeUTCType');

Enjoy!, (*6)

The Versions

24/02 2016

dev-master

9999999-dev

A custom Doctine DBAL type to use PHP DateTime objects set to the UTC timezone.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Austin Morris

doctrine dbal datetime utc

24/02 2016

2.0.0

2.0.0.0

A custom Doctine DBAL type to use PHP DateTime objects set to the UTC timezone.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Austin Morris

doctrine dbal datetime utc

27/11 2014

1.0.0

1.0.0.0

A custom Doctine DBAL type to use PHP DateTime objects set to the UTC timezone.

  Sources   Download

MIT

The Requires

 

The Development Requires

by Austin Morris

doctrine dbal datetime utc