{"action":"created","issue":{"url":"https://api.github.com/repos/sidorares/node-mysql2/issues/857","repository_url":"https://api.github.com/repos/sidorares/node-mysql2","labels_url":"https://api.github.com/repos/sidorares/node-mysql2/issues/857/labels{/name}","comments_url":"https://api.github.com/repos/sidorares/node-mysql2/issues/857/comments","events_url":"https://api.github.com/repos/sidorares/node-mysql2/issues/857/events","html_url":"https://github.com/sidorares/node-mysql2/issues/857","id":368081936,"node_id":"MDU6SXNzdWUzNjgwODE5MzY=","number":857,"title":"Date type and 0000-01-01","user":{"login":"nanom1t","id":6481192,"node_id":"MDQ6VXNlcjY0ODExOTI=","avatar_url":"https://avatars0.githubusercontent.com/u/6481192?v=4","gravatar_id":"","url":"https://api.github.com/users/nanom1t","html_url":"https://github.com/nanom1t","followers_url":"https://api.github.com/users/nanom1t/followers","following_url":"https://api.github.com/users/nanom1t/following{/other_user}","gists_url":"https://api.github.com/users/nanom1t/gists{/gist_id}","starred_url":"https://api.github.com/users/nanom1t/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nanom1t/subscriptions","organizations_url":"https://api.github.com/users/nanom1t/orgs","repos_url":"https://api.github.com/users/nanom1t/repos","events_url":"https://api.github.com/users/nanom1t/events{/privacy}","received_events_url":"https://api.github.com/users/nanom1t/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-10-09T07:49:42Z","updated_at":"2018-10-09T07:53:12Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nI have a date field in MySQL table with 0000-01-01 default value. In MySQL it stores correctly, but when I execute a select query I get '1900-01-01T00:00:00.000Z' value. \r\n![screen shot 2018-10-09 at 10 41 30 am](https://user-images.githubusercontent.com/6481192/46653977-2f1e5600-cbb0-11e8-93bd-f34201952d5c.png)\r\n\r\nI think this a bug, because `0000 != 1900`. I'm using this field for user birthday and age calculating. So when I'm trying to calculate a user age I get 118 years old. I handle zero values in my app and I think I should not handle `1900` value.\r\n\r\nThanks\r\n"},"comment":{"url":"https://api.github.com/repos/sidorares/node-mysql2/issues/comments/428095978","html_url":"https://github.com/sidorares/node-mysql2/issues/857#issuecomment-428095978","issue_url":"https://api.github.com/repos/sidorares/node-mysql2/issues/857","id":428095978,"node_id":"MDEyOklzc3VlQ29tbWVudDQyODA5NTk3OA==","user":{"login":"sidorares","id":173025,"node_id":"MDQ6VXNlcjE3MzAyNQ==","avatar_url":"https://avatars0.githubusercontent.com/u/173025?v=4","gravatar_id":"","url":"https://api.github.com/users/sidorares","html_url":"https://github.com/sidorares","followers_url":"https://api.github.com/users/sidorares/followers","following_url":"https://api.github.com/users/sidorares/following{/other_user}","gists_url":"https://api.github.com/users/sidorares/gists{/gist_id}","starred_url":"https://api.github.com/users/sidorares/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sidorares/subscriptions","organizations_url":"https://api.github.com/users/sidorares/orgs","repos_url":"https://api.github.com/users/sidorares/repos","events_url":"https://api.github.com/users/sidorares/events{/privacy}","received_events_url":"https://api.github.com/users/sidorares/received_events","type":"User","site_admin":false},"created_at":"2018-10-09T07:53:12Z","updated_at":"2018-10-09T07:53:12Z","author_association":"OWNER","body":"could you prepare small test to illustrate issue, including table creation + inserting record with  '0000-01-01' value\r\n\r\nYou can pass `dateStrings: false` connection config flag to prevent driver from converting values it receives as string to JS `Date` objects"}}
{"actor":{"display_login":"sidorares"}}