austinsmorris/doctrine-dbal-datetimeutc
最新稳定版本:2.0.0
Composer 安装命令:
composer require austinsmorris/doctrine-dbal-datetimeutc
包简介
A custom Doctine DBAL type to use PHP DateTime objects set to the UTC timezone.
关键字:
README 文档
README
A Doctine DBAL Custom Mapping Type allowing the use of PHP DateTime objects automatically set to the UTC timezone.
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.
Install via composer:
composer require austinsmorris/doctrine-dbal-datetimeutc:~1.0
Add the custom type before instantiating your entity manager:
use Doctrine\DBAL\Types\Type; Type::addType('datetimeutc', 'ASM\Doctrine\DBAL\Types\DateTimeUTCType');
Enjoy!
统计信息
- 总下载量: 131.16k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 10
- 点击次数: 1
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-11-27