{"action":"created","issue":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/9493","labels_url":"https://api.github.com/repos/yiisoft/yii2/issues/9493/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/9493/comments","events_url":"https://api.github.com/repos/yiisoft/yii2/issues/9493/events","html_url":"https://github.com/yiisoft/yii2/issues/9493","id":102345279,"number":9493,"title":"miss create_time when i used behavior with Expression('NOW()')","user":{"login":"Mirocow","id":376396,"avatar_url":"https://avatars.githubusercontent.com/u/376396?v=3","gravatar_id":"","url":"https://api.github.com/users/Mirocow","html_url":"https://github.com/Mirocow","followers_url":"https://api.github.com/users/Mirocow/followers","following_url":"https://api.github.com/users/Mirocow/following{/other_user}","gists_url":"https://api.github.com/users/Mirocow/gists{/gist_id}","starred_url":"https://api.github.com/users/Mirocow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mirocow/subscriptions","organizations_url":"https://api.github.com/users/Mirocow/orgs","repos_url":"https://api.github.com/users/Mirocow/repos","events_url":"https://api.github.com/users/Mirocow/events{/privacy}","received_events_url":"https://api.github.com/users/Mirocow/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/yiisoft/yii2/labels/type:docs","name":"type:docs","color":"207de5"}],"state":"closed","locked":false,"assignee":{"login":"samdark","id":47294,"avatar_url":"https://avatars.githubusercontent.com/u/47294?v=3","gravatar_id":"","url":"https://api.github.com/users/samdark","html_url":"https://github.com/samdark","followers_url":"https://api.github.com/users/samdark/followers","following_url":"https://api.github.com/users/samdark/following{/other_user}","gists_url":"https://api.github.com/users/samdark/gists{/gist_id}","starred_url":"https://api.github.com/users/samdark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samdark/subscriptions","organizations_url":"https://api.github.com/users/samdark/orgs","repos_url":"https://api.github.com/users/samdark/repos","events_url":"https://api.github.com/users/samdark/events{/privacy}","received_events_url":"https://api.github.com/users/samdark/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-08-21T10:05:49Z","updated_at":"2015-08-21T10:08:29Z","closed_at":"2015-08-21T10:08:29Z","body":"this problem has only i don`t redirect after save moidel\r\n\r\n``` php\r\nclass Invoice extends \\yii\\db\\ActiveRecord\r\n{\r\n// ...\r\n\tpublic function behaviors() {\r\n\t\treturn [\r\n\t\t  'timestamp' => [\r\n\t\t\t'class' => \\yii\\behaviors\\TimestampBehavior::className(),\r\n\t\t\t'createdAtAttribute' => 'create_time',\r\n\t\t\t'updatedAtAttribute' => 'update_time',\r\n\t\t\t'value' => new \\yii\\db\\Expression('NOW()'),\r\n\t\t  ],\r\n\t\t];\r\n\t}\r\n// ...\r\n}\r\n```\r\n\r\n``` php\r\n$model = new Invoice();\r\n$model->load($_POST);\r\nif($model->save){\r\n$this->sendEmail($model);\r\n}\r\n```\r\n\r\nin this case the $model dosen`t have real time in the property create_time, but i have in it only object Expression\r\n\r\nonly after refresh() i can see my datetime"},"comment":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/comments/133362989","html_url":"https://github.com/yiisoft/yii2/issues/9493#issuecomment-133362989","issue_url":"https://api.github.com/repos/yiisoft/yii2/issues/9493","id":133362989,"user":{"login":"klimov-paul","id":1482054,"avatar_url":"https://avatars.githubusercontent.com/u/1482054?v=3","gravatar_id":"","url":"https://api.github.com/users/klimov-paul","html_url":"https://github.com/klimov-paul","followers_url":"https://api.github.com/users/klimov-paul/followers","following_url":"https://api.github.com/users/klimov-paul/following{/other_user}","gists_url":"https://api.github.com/users/klimov-paul/gists{/gist_id}","starred_url":"https://api.github.com/users/klimov-paul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/klimov-paul/subscriptions","organizations_url":"https://api.github.com/users/klimov-paul/orgs","repos_url":"https://api.github.com/users/klimov-paul/repos","events_url":"https://api.github.com/users/klimov-paul/events{/privacy}","received_events_url":"https://api.github.com/users/klimov-paul/received_events","type":"User","site_admin":false},"created_at":"2015-08-21T10:08:29Z","updated_at":"2015-08-21T10:08:29Z","body":"Duplicates #7484"}}