{"action":"created","comment":{"url":"https://api.github.com/repos/diesel-rs/diesel/pulls/comments/115148513","pull_request_review_id":36669006,"id":115148513,"diff_hunk":"@@ -0,0 +1,259 @@\n+extern crate chrono;\n+\n+use std::error::Error;\n+use std::io::Write;\n+use self::chrono::{NaiveDateTime, NaiveDate, NaiveTime, Datelike};\n+\n+use sqlite::Sqlite;\n+use sqlite::connection::SqliteValue;\n+use types::{Date, FromSql, IsNull, Time, Timestamp, ToSql, Text};\n+\n+const SQLITE_TIME_FMT: &'static str = \"%0H:%0M:%0S%.6f\";\n+\n+fn parse_sqlite_date(date: &str) -> Result<NaiveDate, Box<Error+Send+Sync>> {\n+    let negative_year = date.starts_with('-');\n+\n+    let ymd: Vec<u32> = date.split(\"-\").filter_map(|s| s.parse().ok()).collect();","path":"diesel/src/sqlite/types/date_and_time/chrono.rs","position":16,"original_position":16,"commit_id":"fb84435b3330c7e4cbed7698af047b087932c08e","original_commit_id":"fb84435b3330c7e4cbed7698af047b087932c08e","user":{"login":"Eijebong","id":3650385,"avatar_url":"https://avatars1.githubusercontent.com/u/3650385?v=3","gravatar_id":"","url":"https://api.github.com/users/Eijebong","html_url":"https://github.com/Eijebong","followers_url":"https://api.github.com/users/Eijebong/followers","following_url":"https://api.github.com/users/Eijebong/following{/other_user}","gists_url":"https://api.github.com/users/Eijebong/gists{/gist_id}","starred_url":"https://api.github.com/users/Eijebong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eijebong/subscriptions","organizations_url":"https://api.github.com/users/Eijebong/orgs","repos_url":"https://api.github.com/users/Eijebong/repos","events_url":"https://api.github.com/users/Eijebong/events{/privacy}","received_events_url":"https://api.github.com/users/Eijebong/received_events","type":"User","site_admin":false},"body":"Oh, I didn't know that one ^^","created_at":"2017-05-07T17:08:58Z","updated_at":"2017-05-07T17:08:58Z","html_url":"https://github.com/diesel-rs/diesel/pull/887#discussion_r115148513","pull_request_url":"https://api.github.com/repos/diesel-rs/diesel/pulls/887","_links":{"self":{"href":"https://api.github.com/repos/diesel-rs/diesel/pulls/comments/115148513"},"html":{"href":"https://github.com/diesel-rs/diesel/pull/887#discussion_r115148513"},"pull_request":{"href":"https://api.github.com/repos/diesel-rs/diesel/pulls/887"}}},"pull_request":{"url":"https://api.github.com/repos/diesel-rs/diesel/pulls/887","id":119337176,"html_url":"https://github.com/diesel-rs/diesel/pull/887","diff_url":"https://github.com/diesel-rs/diesel/pull/887.diff","patch_url":"https://github.com/diesel-rs/diesel/pull/887.patch","issue_url":"https://api.github.com/repos/diesel-rs/diesel/issues/887","number":887,"state":"open","locked":false,"title":"Add rough support for chrono's Naive{DateTime,Date,Time} types","user":{"login":"Eijebong","id":3650385,"avatar_url":"https://avatars1.githubusercontent.com/u/3650385?v=3","gravatar_id":"","url":"https://api.github.com/users/Eijebong","html_url":"https://github.com/Eijebong","followers_url":"https://api.github.com/users/Eijebong/followers","following_url":"https://api.github.com/users/Eijebong/following{/other_user}","gists_url":"https://api.github.com/users/Eijebong/gists{/gist_id}","starred_url":"https://api.github.com/users/Eijebong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eijebong/subscriptions","organizations_url":"https://api.github.com/users/Eijebong/orgs","repos_url":"https://api.github.com/users/Eijebong/repos","events_url":"https://api.github.com/users/Eijebong/events{/privacy}","received_events_url":"https://api.github.com/users/Eijebong/received_events","type":"User","site_admin":false},"body":"This is #344 with tests and fixed date parsing\r\n\r\nI took the liberty to finish that since nothing happened in the PR for more than a year.\r\n\r\nI had to parse dates without chrono since %Y doesn't support years > 9999","created_at":"2017-05-07T12:37:04Z","updated_at":"2017-05-07T17:08:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c7ac0663ba53b53b712acc36447533277ed1cd68","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/diesel-rs/diesel/pulls/887/commits","review_comments_url":"https://api.github.com/repos/diesel-rs/diesel/pulls/887/comments","review_comment_url":"https://api.github.com/repos/diesel-rs/diesel/pulls/comments{/number}","comments_url":"https://api.github.com/repos/diesel-rs/diesel/issues/887/comments","statuses_url":"https://api.github.com/repos/diesel-rs/diesel/statuses/fb84435b3330c7e4cbed7698af047b087932c08e","head":{"label":"Eijebong:chrono_sqlite","ref":"chrono_sqlite","sha":"fb84435b3330c7e4cbed7698af047b087932c08e","user":{"login":"Eijebong","id":3650385,"avatar_url":"https://avatars1.githubusercontent.com/u/3650385?v=3","gravatar_id":"","url":"https://api.github.com/users/Eijebong","html_url":"https://github.com/Eijebong","followers_url":"https://api.github.com/users/Eijebong/followers","following_url":"https://api.github.com/users/Eijebong/following{/other_user}","gists_url":"https://api.github.com/users/Eijebong/gists{/gist_id}","starred_url":"https://api.github.com/users/Eijebong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eijebong/subscriptions","organizations_url":"https://api.github.com/users/Eijebong/orgs","repos_url":"https://api.github.com/users/Eijebong/repos","events_url":"https://api.github.com/users/Eijebong/events{/privacy}","received_events_url":"https://api.github.com/users/Eijebong/received_events","type":"User","site_admin":false},"repo":{"id":81142956,"name":"diesel","full_name":"Eijebong/diesel","owner":{"login":"Eijebong","id":3650385,"avatar_url":"https://avatars1.githubusercontent.com/u/3650385?v=3","gravatar_id":"","url":"https://api.github.com/users/Eijebong","html_url":"https://github.com/Eijebong","followers_url":"https://api.github.com/users/Eijebong/followers","following_url":"https://api.github.com/users/Eijebong/following{/other_user}","gists_url":"https://api.github.com/users/Eijebong/gists{/gist_id}","starred_url":"https://api.github.com/users/Eijebong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Eijebong/subscriptions","organizations_url":"https://api.github.com/users/Eijebong/orgs","repos_url":"https://api.github.com/users/Eijebong/repos","events_url":"https://api.github.com/users/Eijebong/events{/privacy}","received_events_url":"https://api.github.com/users/Eijebong/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Eijebong/diesel","description":"A safe, extensible ORM and Query Builder for Rust","fork":true,"url":"https://api.github.com/repos/Eijebong/diesel","forks_url":"https://api.github.com/repos/Eijebong/diesel/forks","keys_url":"https://api.github.com/repos/Eijebong/diesel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Eijebong/diesel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Eijebong/diesel/teams","hooks_url":"https://api.github.com/repos/Eijebong/diesel/hooks","issue_events_url":"https://api.github.com/repos/Eijebong/diesel/issues/events{/number}","events_url":"https://api.github.com/repos/Eijebong/diesel/events","assignees_url":"https://api.github.com/repos/Eijebong/diesel/assignees{/user}","branches_url":"https://api.github.com/repos/Eijebong/diesel/branches{/branch}","tags_url":"https://api.github.com/repos/Eijebong/diesel/tags","blobs_url":"https://api.github.com/repos/Eijebong/diesel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Eijebong/diesel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Eijebong/diesel/git/refs{/sha}","trees_url":"https://api.github.com/repos/Eijebong/diesel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Eijebong/diesel/statuses/{sha}","languages_url":"https://api.github.com/repos/Eijebong/diesel/languages","stargazers_url":"https://api.github.com/repos/Eijebong/diesel/stargazers","contributors_url":"https://api.github.com/repos/Eijebong/diesel/contributors","subscribers_url":"https://api.github.com/repos/Eijebong/diesel/subscribers","subscription_url":"https://api.github.com/repos/Eijebong/diesel/subscription","commits_url":"https://api.github.com/repos/Eijebong/diesel/commits{/sha}","git_commits_url":"https://api.github.com/repos/Eijebong/diesel/git/commits{/sha}","comments_url":"https://api.github.com/repos/Eijebong/diesel/comments{/number}","issue_comment_url":"https://api.github.com/repos/Eijebong/diesel/issues/comments{/number}","contents_url":"https://api.github.com/repos/Eijebong/diesel/contents/{+path}","compare_url":"https://api.github.com/repos/Eijebong/diesel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Eijebong/diesel/merges","archive_url":"https://api.github.com/repos/Eijebong/diesel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Eijebong/diesel/downloads","issues_url":"https://api.github.com/repos/Eijebong/diesel/issues{/number}","pulls_url":"https://api.github.com/repos/Eijebong/diesel/pulls{/number}","milestones_url":"https://api.github.com/repos/Eijebong/diesel/milestones{/number}","notifications_url":"https://api.github.com/repos/Eijebong/diesel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Eijebong/diesel/labels{/name}","releases_url":"https://api.github.com/repos/Eijebong/diesel/releases{/id}","deployments_url":"https://api.github.com/repos/Eijebong/diesel/deployments","created_at":"2017-02-06T23:06:42Z","updated_at":"2017-02-06T23:06:45Z","pushed_at":"2017-05-07T14:49:02Z","git_url":"git://github.com/Eijebong/diesel.git","ssh_url":"git@github.com:Eijebong/diesel.git","clone_url":"https://github.com/Eijebong/diesel.git","svn_url":"https://github.com/Eijebong/diesel","homepage":"http://diesel.rs","size":7157,"stargazers_count":0,"watchers_count":0,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"diesel-rs:master","ref":"master","sha":"e5da6f5c1f9bade38d28a043ecae9944edfe4774","user":{"login":"diesel-rs","id":16763251,"avatar_url":"https://avatars1.githubusercontent.com/u/16763251?v=3","gravatar_id":"","url":"https://api.github.com/users/diesel-rs","html_url":"https://github.com/diesel-rs","followers_url":"https://api.github.com/users/diesel-rs/followers","following_url":"https://api.github.com/users/diesel-rs/following{/other_user}","gists_url":"https://api.github.com/users/diesel-rs/gists{/gist_id}","starred_url":"https://api.github.com/users/diesel-rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diesel-rs/subscriptions","organizations_url":"https://api.github.com/users/diesel-rs/orgs","repos_url":"https://api.github.com/users/diesel-rs/repos","events_url":"https://api.github.com/users/diesel-rs/events{/privacy}","received_events_url":"https://api.github.com/users/diesel-rs/received_events","type":"Organization","site_admin":false},"repo":{"id":41609775,"name":"diesel","full_name":"diesel-rs/diesel","owner":{"login":"diesel-rs","id":16763251,"avatar_url":"https://avatars1.githubusercontent.com/u/16763251?v=3","gravatar_id":"","url":"https://api.github.com/users/diesel-rs","html_url":"https://github.com/diesel-rs","followers_url":"https://api.github.com/users/diesel-rs/followers","following_url":"https://api.github.com/users/diesel-rs/following{/other_user}","gists_url":"https://api.github.com/users/diesel-rs/gists{/gist_id}","starred_url":"https://api.github.com/users/diesel-rs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diesel-rs/subscriptions","organizations_url":"https://api.github.com/users/diesel-rs/orgs","repos_url":"https://api.github.com/users/diesel-rs/repos","events_url":"https://api.github.com/users/diesel-rs/events{/privacy}","received_events_url":"https://api.github.com/users/diesel-rs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/diesel-rs/diesel","description":"A safe, extensible ORM and Query Builder for Rust","fork":false,"url":"https://api.github.com/repos/diesel-rs/diesel","forks_url":"https://api.github.com/repos/diesel-rs/diesel/forks","keys_url":"https://api.github.com/repos/diesel-rs/diesel/keys{/key_id}","collaborators_url":"https://api.github.com/repos/diesel-rs/diesel/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/diesel-rs/diesel/teams","hooks_url":"https://api.github.com/repos/diesel-rs/diesel/hooks","issue_events_url":"https://api.github.com/repos/diesel-rs/diesel/issues/events{/number}","events_url":"https://api.github.com/repos/diesel-rs/diesel/events","assignees_url":"https://api.github.com/repos/diesel-rs/diesel/assignees{/user}","branches_url":"https://api.github.com/repos/diesel-rs/diesel/branches{/branch}","tags_url":"https://api.github.com/repos/diesel-rs/diesel/tags","blobs_url":"https://api.github.com/repos/diesel-rs/diesel/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/diesel-rs/diesel/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/diesel-rs/diesel/git/refs{/sha}","trees_url":"https://api.github.com/repos/diesel-rs/diesel/git/trees{/sha}","statuses_url":"https://api.github.com/repos/diesel-rs/diesel/statuses/{sha}","languages_url":"https://api.github.com/repos/diesel-rs/diesel/languages","stargazers_url":"https://api.github.com/repos/diesel-rs/diesel/stargazers","contributors_url":"https://api.github.com/repos/diesel-rs/diesel/contributors","subscribers_url":"https://api.github.com/repos/diesel-rs/diesel/subscribers","subscription_url":"https://api.github.com/repos/diesel-rs/diesel/subscription","commits_url":"https://api.github.com/repos/diesel-rs/diesel/commits{/sha}","git_commits_url":"https://api.github.com/repos/diesel-rs/diesel/git/commits{/sha}","comments_url":"https://api.github.com/repos/diesel-rs/diesel/comments{/number}","issue_comment_url":"https://api.github.com/repos/diesel-rs/diesel/issues/comments{/number}","contents_url":"https://api.github.com/repos/diesel-rs/diesel/contents/{+path}","compare_url":"https://api.github.com/repos/diesel-rs/diesel/compare/{base}...{head}","merges_url":"https://api.github.com/repos/diesel-rs/diesel/merges","archive_url":"https://api.github.com/repos/diesel-rs/diesel/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/diesel-rs/diesel/downloads","issues_url":"https://api.github.com/repos/diesel-rs/diesel/issues{/number}","pulls_url":"https://api.github.com/repos/diesel-rs/diesel/pulls{/number}","milestones_url":"https://api.github.com/repos/diesel-rs/diesel/milestones{/number}","notifications_url":"https://api.github.com/repos/diesel-rs/diesel/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/diesel-rs/diesel/labels{/name}","releases_url":"https://api.github.com/repos/diesel-rs/diesel/releases{/id}","deployments_url":"https://api.github.com/repos/diesel-rs/diesel/deployments","created_at":"2015-08-29T22:51:00Z","updated_at":"2017-05-07T14:24:13Z","pushed_at":"2017-05-07T16:34:00Z","git_url":"git://github.com/diesel-rs/diesel.git","ssh_url":"git@github.com:diesel-rs/diesel.git","clone_url":"https://github.com/diesel-rs/diesel.git","svn_url":"https://github.com/diesel-rs/diesel","homepage":"http://diesel.rs","size":10674,"stargazers_count":1565,"watchers_count":1565,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":143,"mirror_url":null,"open_issues_count":120,"forks":143,"open_issues":120,"watchers":1565,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/diesel-rs/diesel/pulls/887"},"html":{"href":"https://github.com/diesel-rs/diesel/pull/887"},"issue":{"href":"https://api.github.com/repos/diesel-rs/diesel/issues/887"},"comments":{"href":"https://api.github.com/repos/diesel-rs/diesel/issues/887/comments"},"review_comments":{"href":"https://api.github.com/repos/diesel-rs/diesel/pulls/887/comments"},"review_comment":{"href":"https://api.github.com/repos/diesel-rs/diesel/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/diesel-rs/diesel/pulls/887/commits"},"statuses":{"href":"https://api.github.com/repos/diesel-rs/diesel/statuses/fb84435b3330c7e4cbed7698af047b087932c08e"}}}}
{"actor":{"display_login":"Eijebong"}}