{"action":"created","issue":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/6348","labels_url":"https://api.github.com/repos/cakephp/cakephp/issues/6348/labels{/name}","comments_url":"https://api.github.com/repos/cakephp/cakephp/issues/6348/comments","events_url":"https://api.github.com/repos/cakephp/cakephp/issues/6348/events","html_url":"https://github.com/cakephp/cakephp/pull/6348","id":68891712,"number":6348,"title":"Allow BC for nullish DB values as strings.","user":{"login":"dereuromark","id":39854,"avatar_url":"https://avatars.githubusercontent.com/u/39854?v=3","gravatar_id":"","url":"https://api.github.com/users/dereuromark","html_url":"https://github.com/dereuromark","followers_url":"https://api.github.com/users/dereuromark/followers","following_url":"https://api.github.com/users/dereuromark/following{/other_user}","gists_url":"https://api.github.com/users/dereuromark/gists{/gist_id}","starred_url":"https://api.github.com/users/dereuromark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dereuromark/subscriptions","organizations_url":"https://api.github.com/users/dereuromark/orgs","repos_url":"https://api.github.com/users/dereuromark/repos","events_url":"https://api.github.com/users/dereuromark/events{/privacy}","received_events_url":"https://api.github.com/users/dereuromark/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/cakephp/cakephp/labels/Defect","name":"Defect","color":"f7c6c7"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/cakephp/cakephp/milestones/36","html_url":"https://github.com/cakephp/cakephp/milestones/3.0.2","labels_url":"https://api.github.com/repos/cakephp/cakephp/milestones/36/labels","id":1053402,"number":36,"title":"3.0.2","description":"Bugfixes and optimisations for 3.0","creator":{"login":"markstory","id":24086,"avatar_url":"https://avatars.githubusercontent.com/u/24086?v=3","gravatar_id":"","url":"https://api.github.com/users/markstory","html_url":"https://github.com/markstory","followers_url":"https://api.github.com/users/markstory/followers","following_url":"https://api.github.com/users/markstory/following{/other_user}","gists_url":"https://api.github.com/users/markstory/gists{/gist_id}","starred_url":"https://api.github.com/users/markstory/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markstory/subscriptions","organizations_url":"https://api.github.com/users/markstory/orgs","repos_url":"https://api.github.com/users/markstory/repos","events_url":"https://api.github.com/users/markstory/events{/privacy}","received_events_url":"https://api.github.com/users/markstory/received_events","type":"User","site_admin":false},"open_issues":23,"closed_issues":41,"state":"open","created_at":"2015-04-05T14:22:30Z","updated_at":"2015-04-16T12:17:08Z","due_on":"2015-04-19T04:00:00Z","closed_at":null},"comments":1,"created_at":"2015-04-16T10:14:39Z","updated_at":"2015-04-16T12:33:39Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cakephp/cakephp/pulls/6348","html_url":"https://github.com/cakephp/cakephp/pull/6348","diff_url":"https://github.com/cakephp/cakephp/pull/6348.diff","patch_url":"https://github.com/cakephp/cakephp/pull/6348.patch"},"body":"When working with legacy apps/DBs, there often is the (valid in MySQL) string value `0000-00-00 ...` used for NULL. That currently breaks terribly, as it is converted to a negative value in Carbon:\r\n```\r\nobject(Cake\\I18n\\Time) {\r\n\t'time' => '-0001-11-30T00:00:00+0000',\r\n\t'timezone' => 'UTC',\r\n\t'fixedNowTime' => false\r\n}\r\n```\r\n\r\nAnd then throws errors like\r\n```\r\nIntlDateFormatter::format(): datefmt_format: error calling ::getTimeStamp() on the object [CORE\\src\\I18n\\Time.php, line 597]\r\n```\r\n\r\nThis is an easy fix here for BC and doesn't hurt IMO.\r\n\r\nPS: \"MySQL permits you to store a “zero” value of '0000-00-00' as a “dummy date.” This is in some cases more convenient than using NULL values, and uses less data and index space\" https://dev.mysql.com/doc/refman/5.0/en/date-and-time-types.html Even though people really should be using NULL here as default value :)"},"comment":{"url":"https://api.github.com/repos/cakephp/cakephp/issues/comments/93722938","html_url":"https://github.com/cakephp/cakephp/pull/6348#issuecomment-93722938","issue_url":"https://api.github.com/repos/cakephp/cakephp/issues/6348","id":93722938,"user":{"login":"lorenzo","id":37621,"avatar_url":"https://avatars.githubusercontent.com/u/37621?v=3","gravatar_id":"","url":"https://api.github.com/users/lorenzo","html_url":"https://github.com/lorenzo","followers_url":"https://api.github.com/users/lorenzo/followers","following_url":"https://api.github.com/users/lorenzo/following{/other_user}","gists_url":"https://api.github.com/users/lorenzo/gists{/gist_id}","starred_url":"https://api.github.com/users/lorenzo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lorenzo/subscriptions","organizations_url":"https://api.github.com/users/lorenzo/orgs","repos_url":"https://api.github.com/users/lorenzo/repos","events_url":"https://api.github.com/users/lorenzo/events{/privacy}","received_events_url":"https://api.github.com/users/lorenzo/received_events","type":"User","site_admin":false},"created_at":"2015-04-16T12:33:39Z","updated_at":"2015-04-16T12:33:39Z","body":"I'm ok with this"}}