{"action":"created","issue":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/8860","labels_url":"https://api.github.com/repos/yiisoft/yii2/issues/8860/labels{/name}","comments_url":"https://api.github.com/repos/yiisoft/yii2/issues/8860/comments","events_url":"https://api.github.com/repos/yiisoft/yii2/issues/8860/events","html_url":"https://github.com/yiisoft/yii2/issues/8860","id":89961811,"number":8860,"title":"Timestamp behaviour issue","user":{"login":"turalsprofile","id":724507,"avatar_url":"https://avatars.githubusercontent.com/u/724507?v=3","gravatar_id":"","url":"https://api.github.com/users/turalsprofile","html_url":"https://github.com/turalsprofile","followers_url":"https://api.github.com/users/turalsprofile/followers","following_url":"https://api.github.com/users/turalsprofile/following{/other_user}","gists_url":"https://api.github.com/users/turalsprofile/gists{/gist_id}","starred_url":"https://api.github.com/users/turalsprofile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/turalsprofile/subscriptions","organizations_url":"https://api.github.com/users/turalsprofile/orgs","repos_url":"https://api.github.com/users/turalsprofile/repos","events_url":"https://api.github.com/users/turalsprofile/events{/privacy}","received_events_url":"https://api.github.com/users/turalsprofile/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-06-21T21:13:53Z","updated_at":"2015-06-22T00:05:48Z","closed_at":"2015-06-21T21:19:55Z","body":"Take a look at the configuration code below. I want to change/override only 'createdAtAttribute',\r\n 'updatedAtAttribute'. Why on earth do I have to write extra line for 'value', if I want to keep it as default? \r\n\r\nI checked without this line, it doesn't insert to db anything.\r\n```\r\npublic function behaviors()\r\n{\r\n    return [\r\n        [\r\n            'class' => TimestampBehavior::className(),\r\n            'createdAtAttribute' => 'create_time',\r\n            'updatedAtAttribute' => 'update_time',\r\n            'value' => new Expression('NOW()'),\r\n        ],\r\n    ];\r\n}\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/yiisoft/yii2/issues/comments/113970997","html_url":"https://github.com/yiisoft/yii2/issues/8860#issuecomment-113970997","issue_url":"https://api.github.com/repos/yiisoft/yii2/issues/8860","id":113970997,"user":{"login":"cebe","id":189796,"avatar_url":"https://avatars.githubusercontent.com/u/189796?v=3","gravatar_id":"","url":"https://api.github.com/users/cebe","html_url":"https://github.com/cebe","followers_url":"https://api.github.com/users/cebe/followers","following_url":"https://api.github.com/users/cebe/following{/other_user}","gists_url":"https://api.github.com/users/cebe/gists{/gist_id}","starred_url":"https://api.github.com/users/cebe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cebe/subscriptions","organizations_url":"https://api.github.com/users/cebe/orgs","repos_url":"https://api.github.com/users/cebe/repos","events_url":"https://api.github.com/users/cebe/events{/privacy}","received_events_url":"https://api.github.com/users/cebe/received_events","type":"User","site_admin":false},"created_at":"2015-06-22T00:05:48Z","updated_at":"2015-06-22T00:05:48Z","body":"This is because a Unix timestamp does not match your schema definition. Looks like you have DATETIME type declared for your column. The default assumption is integer which works the same for all DBMS."}}