is there any way in ActiveRecord for changing the timezone of database dynamically on the time of connection .
i am using it with codeigniter . problem is that i change the timezone in codeigniter successfully, but it don't effects on ActiveRecord queries.
thanks in advance .
date_default_timezone_set('America/New_York');
static $datetime_format = 'Y-m-d H:i:s';
//Include the ActiveRecord DateTime Class
require_once $spark_path.'vendor/php-activerecord/lib/DateTime.php';
//it should use your database time format, once you set it.
ActiveRecord\DateTime::$DEFAULT_FORMAT = 'db';