jpfuentes2 / php-activerecord

ActiveRecord implementation for PHP
http://www.phpactiverecord.org/
Other
1.32k stars 443 forks source link

ActiveRecord\DateTime creation: ambiguous timezone specifier #520

Open litchie opened 8 years ago

litchie commented 8 years ago

Previously ActiveRecord::DateTime object was created from a PHP DateTime's formatted string ('Y-m-d h:i:s T'), T represents a 3 letter time zone abbreviation. And unfortunately UTC+08:00 and UTC-06:00 share a same abbr. CST.

So suggested fix is to use the timezone information directly fetched from PHP DateTime object without using any formatting.