{"action":"closed","number":119,"pull_request":{"url":"https://api.github.com/repos/Pomona/Pomona/pulls/119","id":93773324,"html_url":"https://github.com/Pomona/Pomona/pull/119","diff_url":"https://github.com/Pomona/Pomona/pull/119.diff","patch_url":"https://github.com/Pomona/Pomona/pull/119.patch","issue_url":"https://api.github.com/repos/Pomona/Pomona/issues/119","number":119,"state":"closed","locked":false,"title":"Add query support for DateTimeOffset","user":{"login":"asbjornu","id":12283,"avatar_url":"https://avatars.githubusercontent.com/u/12283?v=3","gravatar_id":"","url":"https://api.github.com/users/asbjornu","html_url":"https://github.com/asbjornu","followers_url":"https://api.github.com/users/asbjornu/followers","following_url":"https://api.github.com/users/asbjornu/following{/other_user}","gists_url":"https://api.github.com/users/asbjornu/gists{/gist_id}","starred_url":"https://api.github.com/users/asbjornu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asbjornu/subscriptions","organizations_url":"https://api.github.com/users/asbjornu/orgs","repos_url":"https://api.github.com/users/asbjornu/repos","events_url":"https://api.github.com/users/asbjornu/events{/privacy}","received_events_url":"https://api.github.com/users/asbjornu/received_events","type":"User","site_admin":false},"body":"Disclaimer: This PR should ideally be 3 different ones, but I couldn't be bothered. The interesting stuff is in 88e91978f84d9a0705afa71950f6c00cba75a59f, where I try to implement query support for the `DateTimeOffset` type, by recognising the `+HH:mm` pattern in the `datetime` string in a query. If it matches the timezone pattern, it's a `DateTimeOffset`, if it doesn't, it's an old-school `DateTime`.\r\n\r\nThe only remaining thing to fix is that the following test fails:\r\n\r\n```c#\r\nnamespace Pomona.SystemTests\r\n{\r\n    class Pomona.SystemTests.QueryCritterTests\r\n    {\r\n        [Test]\r\n        public void QueryCritter_WithDateTimeOffsetEquals_ReturnsCorrectResult()\r\n        {\r\n            var firstCritter = Repository.List<Critter>().First();\r\n            var createdOnOffset = firstCritter.CreatedOnOffset;\r\n            var fetchedCritter = Client.Query<ICritter>(x => x.CreatedOnOffset == createdOnOffset).ToList();\r\n\r\n            Assert.That(fetchedCritter, Has.Count.GreaterThanOrEqualTo(1));\r\n            Assert.That(fetchedCritter.First().Id, Is.EqualTo(firstCritter.Id));\r\n        }\r\n    }\r\n}\r\n```\r\n\r\nI've inspected the expression tree in the debugger, and both sides of the operand are of the type `DateTimeOffset`, and the test data matches the `createdOnOffset` used in the query, but it still doesn't return any results. Ideas?","created_at":"2016-11-15T14:17:53Z","updated_at":"2016-11-15T18:11:43Z","closed_at":"2016-11-15T18:11:43Z","merged_at":"2016-11-15T18:11:43Z","merge_commit_sha":"5cfeceba271aa158dbb9f3c18edeef24b48532b5","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/Pomona/Pomona/pulls/119/commits","review_comments_url":"https://api.github.com/repos/Pomona/Pomona/pulls/119/comments","review_comment_url":"https://api.github.com/repos/Pomona/Pomona/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Pomona/Pomona/issues/119/comments","statuses_url":"https://api.github.com/repos/Pomona/Pomona/statuses/b44adf825c2e92f26ddfaabfabdd1e2c489c2971","head":{"label":"Pomona:feature/datetimeoffset","ref":"feature/datetimeoffset","sha":"b44adf825c2e92f26ddfaabfabdd1e2c489c2971","user":{"login":"Pomona","id":17871266,"avatar_url":"https://avatars.githubusercontent.com/u/17871266?v=3","gravatar_id":"","url":"https://api.github.com/users/Pomona","html_url":"https://github.com/Pomona","followers_url":"https://api.github.com/users/Pomona/followers","following_url":"https://api.github.com/users/Pomona/following{/other_user}","gists_url":"https://api.github.com/users/Pomona/gists{/gist_id}","starred_url":"https://api.github.com/users/Pomona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pomona/subscriptions","organizations_url":"https://api.github.com/users/Pomona/orgs","repos_url":"https://api.github.com/users/Pomona/repos","events_url":"https://api.github.com/users/Pomona/events{/privacy}","received_events_url":"https://api.github.com/users/Pomona/received_events","type":"Organization","site_admin":false},"repo":{"id":4858013,"name":"Pomona","full_name":"Pomona/Pomona","owner":{"login":"Pomona","id":17871266,"avatar_url":"https://avatars.githubusercontent.com/u/17871266?v=3","gravatar_id":"","url":"https://api.github.com/users/Pomona","html_url":"https://github.com/Pomona","followers_url":"https://api.github.com/users/Pomona/followers","following_url":"https://api.github.com/users/Pomona/following{/other_user}","gists_url":"https://api.github.com/users/Pomona/gists{/gist_id}","starred_url":"https://api.github.com/users/Pomona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pomona/subscriptions","organizations_url":"https://api.github.com/users/Pomona/orgs","repos_url":"https://api.github.com/users/Pomona/repos","events_url":"https://api.github.com/users/Pomona/events{/privacy}","received_events_url":"https://api.github.com/users/Pomona/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Pomona/Pomona","description":"A fruitful way to REST","fork":false,"url":"https://api.github.com/repos/Pomona/Pomona","forks_url":"https://api.github.com/repos/Pomona/Pomona/forks","keys_url":"https://api.github.com/repos/Pomona/Pomona/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Pomona/Pomona/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Pomona/Pomona/teams","hooks_url":"https://api.github.com/repos/Pomona/Pomona/hooks","issue_events_url":"https://api.github.com/repos/Pomona/Pomona/issues/events{/number}","events_url":"https://api.github.com/repos/Pomona/Pomona/events","assignees_url":"https://api.github.com/repos/Pomona/Pomona/assignees{/user}","branches_url":"https://api.github.com/repos/Pomona/Pomona/branches{/branch}","tags_url":"https://api.github.com/repos/Pomona/Pomona/tags","blobs_url":"https://api.github.com/repos/Pomona/Pomona/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Pomona/Pomona/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Pomona/Pomona/git/refs{/sha}","trees_url":"https://api.github.com/repos/Pomona/Pomona/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Pomona/Pomona/statuses/{sha}","languages_url":"https://api.github.com/repos/Pomona/Pomona/languages","stargazers_url":"https://api.github.com/repos/Pomona/Pomona/stargazers","contributors_url":"https://api.github.com/repos/Pomona/Pomona/contributors","subscribers_url":"https://api.github.com/repos/Pomona/Pomona/subscribers","subscription_url":"https://api.github.com/repos/Pomona/Pomona/subscription","commits_url":"https://api.github.com/repos/Pomona/Pomona/commits{/sha}","git_commits_url":"https://api.github.com/repos/Pomona/Pomona/git/commits{/sha}","comments_url":"https://api.github.com/repos/Pomona/Pomona/comments{/number}","issue_comment_url":"https://api.github.com/repos/Pomona/Pomona/issues/comments{/number}","contents_url":"https://api.github.com/repos/Pomona/Pomona/contents/{+path}","compare_url":"https://api.github.com/repos/Pomona/Pomona/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Pomona/Pomona/merges","archive_url":"https://api.github.com/repos/Pomona/Pomona/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Pomona/Pomona/downloads","issues_url":"https://api.github.com/repos/Pomona/Pomona/issues{/number}","pulls_url":"https://api.github.com/repos/Pomona/Pomona/pulls{/number}","milestones_url":"https://api.github.com/repos/Pomona/Pomona/milestones{/number}","notifications_url":"https://api.github.com/repos/Pomona/Pomona/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Pomona/Pomona/labels{/name}","releases_url":"https://api.github.com/repos/Pomona/Pomona/releases{/id}","deployments_url":"https://api.github.com/repos/Pomona/Pomona/deployments","created_at":"2012-07-02T09:32:19Z","updated_at":"2016-11-02T14:28:14Z","pushed_at":"2016-11-15T18:11:43Z","git_url":"git://github.com/Pomona/Pomona.git","ssh_url":"git@github.com:Pomona/Pomona.git","clone_url":"https://github.com/Pomona/Pomona.git","svn_url":"https://github.com/Pomona/Pomona","homepage":"","size":18442,"stargazers_count":10,"watchers_count":10,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":41,"forks":6,"open_issues":41,"watchers":10,"default_branch":"develop"}},"base":{"label":"Pomona:develop","ref":"develop","sha":"817a4dfb2a85b58ef12bf93c12c8d5c6df9f233f","user":{"login":"Pomona","id":17871266,"avatar_url":"https://avatars.githubusercontent.com/u/17871266?v=3","gravatar_id":"","url":"https://api.github.com/users/Pomona","html_url":"https://github.com/Pomona","followers_url":"https://api.github.com/users/Pomona/followers","following_url":"https://api.github.com/users/Pomona/following{/other_user}","gists_url":"https://api.github.com/users/Pomona/gists{/gist_id}","starred_url":"https://api.github.com/users/Pomona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pomona/subscriptions","organizations_url":"https://api.github.com/users/Pomona/orgs","repos_url":"https://api.github.com/users/Pomona/repos","events_url":"https://api.github.com/users/Pomona/events{/privacy}","received_events_url":"https://api.github.com/users/Pomona/received_events","type":"Organization","site_admin":false},"repo":{"id":4858013,"name":"Pomona","full_name":"Pomona/Pomona","owner":{"login":"Pomona","id":17871266,"avatar_url":"https://avatars.githubusercontent.com/u/17871266?v=3","gravatar_id":"","url":"https://api.github.com/users/Pomona","html_url":"https://github.com/Pomona","followers_url":"https://api.github.com/users/Pomona/followers","following_url":"https://api.github.com/users/Pomona/following{/other_user}","gists_url":"https://api.github.com/users/Pomona/gists{/gist_id}","starred_url":"https://api.github.com/users/Pomona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Pomona/subscriptions","organizations_url":"https://api.github.com/users/Pomona/orgs","repos_url":"https://api.github.com/users/Pomona/repos","events_url":"https://api.github.com/users/Pomona/events{/privacy}","received_events_url":"https://api.github.com/users/Pomona/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Pomona/Pomona","description":"A fruitful way to REST","fork":false,"url":"https://api.github.com/repos/Pomona/Pomona","forks_url":"https://api.github.com/repos/Pomona/Pomona/forks","keys_url":"https://api.github.com/repos/Pomona/Pomona/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Pomona/Pomona/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Pomona/Pomona/teams","hooks_url":"https://api.github.com/repos/Pomona/Pomona/hooks","issue_events_url":"https://api.github.com/repos/Pomona/Pomona/issues/events{/number}","events_url":"https://api.github.com/repos/Pomona/Pomona/events","assignees_url":"https://api.github.com/repos/Pomona/Pomona/assignees{/user}","branches_url":"https://api.github.com/repos/Pomona/Pomona/branches{/branch}","tags_url":"https://api.github.com/repos/Pomona/Pomona/tags","blobs_url":"https://api.github.com/repos/Pomona/Pomona/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Pomona/Pomona/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Pomona/Pomona/git/refs{/sha}","trees_url":"https://api.github.com/repos/Pomona/Pomona/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Pomona/Pomona/statuses/{sha}","languages_url":"https://api.github.com/repos/Pomona/Pomona/languages","stargazers_url":"https://api.github.com/repos/Pomona/Pomona/stargazers","contributors_url":"https://api.github.com/repos/Pomona/Pomona/contributors","subscribers_url":"https://api.github.com/repos/Pomona/Pomona/subscribers","subscription_url":"https://api.github.com/repos/Pomona/Pomona/subscription","commits_url":"https://api.github.com/repos/Pomona/Pomona/commits{/sha}","git_commits_url":"https://api.github.com/repos/Pomona/Pomona/git/commits{/sha}","comments_url":"https://api.github.com/repos/Pomona/Pomona/comments{/number}","issue_comment_url":"https://api.github.com/repos/Pomona/Pomona/issues/comments{/number}","contents_url":"https://api.github.com/repos/Pomona/Pomona/contents/{+path}","compare_url":"https://api.github.com/repos/Pomona/Pomona/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Pomona/Pomona/merges","archive_url":"https://api.github.com/repos/Pomona/Pomona/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Pomona/Pomona/downloads","issues_url":"https://api.github.com/repos/Pomona/Pomona/issues{/number}","pulls_url":"https://api.github.com/repos/Pomona/Pomona/pulls{/number}","milestones_url":"https://api.github.com/repos/Pomona/Pomona/milestones{/number}","notifications_url":"https://api.github.com/repos/Pomona/Pomona/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Pomona/Pomona/labels{/name}","releases_url":"https://api.github.com/repos/Pomona/Pomona/releases{/id}","deployments_url":"https://api.github.com/repos/Pomona/Pomona/deployments","created_at":"2012-07-02T09:32:19Z","updated_at":"2016-11-02T14:28:14Z","pushed_at":"2016-11-15T18:11:43Z","git_url":"git://github.com/Pomona/Pomona.git","ssh_url":"git@github.com:Pomona/Pomona.git","clone_url":"https://github.com/Pomona/Pomona.git","svn_url":"https://github.com/Pomona/Pomona","homepage":"","size":18442,"stargazers_count":10,"watchers_count":10,"language":"C#","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":41,"forks":6,"open_issues":41,"watchers":10,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/Pomona/Pomona/pulls/119"},"html":{"href":"https://github.com/Pomona/Pomona/pull/119"},"issue":{"href":"https://api.github.com/repos/Pomona/Pomona/issues/119"},"comments":{"href":"https://api.github.com/repos/Pomona/Pomona/issues/119/comments"},"review_comments":{"href":"https://api.github.com/repos/Pomona/Pomona/pulls/119/comments"},"review_comment":{"href":"https://api.github.com/repos/Pomona/Pomona/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Pomona/Pomona/pulls/119/commits"},"statuses":{"href":"https://api.github.com/repos/Pomona/Pomona/statuses/b44adf825c2e92f26ddfaabfabdd1e2c489c2971"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"asbjornu","id":12283,"avatar_url":"https://avatars.githubusercontent.com/u/12283?v=3","gravatar_id":"","url":"https://api.github.com/users/asbjornu","html_url":"https://github.com/asbjornu","followers_url":"https://api.github.com/users/asbjornu/followers","following_url":"https://api.github.com/users/asbjornu/following{/other_user}","gists_url":"https://api.github.com/users/asbjornu/gists{/gist_id}","starred_url":"https://api.github.com/users/asbjornu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asbjornu/subscriptions","organizations_url":"https://api.github.com/users/asbjornu/orgs","repos_url":"https://api.github.com/users/asbjornu/repos","events_url":"https://api.github.com/users/asbjornu/events{/privacy}","received_events_url":"https://api.github.com/users/asbjornu/received_events","type":"User","site_admin":false},"comments":0,"review_comments":0,"commits":11,"additions":565,"deletions":358,"changed_files":62}}
{"actor":{"display_login":"asbjornu"}}