{"action":"created","comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/31621595","id":31621595,"diff_hunk":"@@ -133,6 +134,10 @@ public static FormatDateTimeFormatter forPattern(String input, Locale locale) {\n             formatter = ISODateTimeFormat.yearMonth();\n         } else if (\"yearMonthDay\".equals(input) || \"year_month_day\".equals(input)) {\n             formatter = ISODateTimeFormat.yearMonthDay();\n+        } else if (\"epoch_second\".equals(input)) {","path":"src/main/java/org/elasticsearch/common/joda/Joda.java","position":12,"original_position":12,"commit_id":"9ddf7d8ab4c76784f5032703aa228b4a2afc3499","original_commit_id":"2d55d8c4069dfb84f078d500dfb9992b24797aa0","user":{"login":"colings86","id":236731,"avatar_url":"https://avatars.githubusercontent.com/u/236731?v=3","gravatar_id":"","url":"https://api.github.com/users/colings86","html_url":"https://github.com/colings86","followers_url":"https://api.github.com/users/colings86/followers","following_url":"https://api.github.com/users/colings86/following{/other_user}","gists_url":"https://api.github.com/users/colings86/gists{/gist_id}","starred_url":"https://api.github.com/users/colings86/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/colings86/subscriptions","organizations_url":"https://api.github.com/users/colings86/orgs","repos_url":"https://api.github.com/users/colings86/repos","events_url":"https://api.github.com/users/colings86/events{/privacy}","received_events_url":"https://api.github.com/users/colings86/received_events","type":"User","site_admin":false},"body":"I would also be fine with removing all the camelCase options for all formats in this PR to make it consistent.","created_at":"2015-06-03T13:25:25Z","updated_at":"2015-06-03T13:25:25Z","html_url":"https://github.com/elastic/elasticsearch/pull/11453#discussion_r31621595","pull_request_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/11453","_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments/31621595"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/11453#discussion_r31621595"},"pull_request":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/11453"}}},"pull_request":{"url":"https://api.github.com/repos/elastic/elasticsearch/pulls/11453","id":36720460,"html_url":"https://github.com/elastic/elasticsearch/pull/11453","diff_url":"https://github.com/elastic/elasticsearch/pull/11453.diff","patch_url":"https://github.com/elastic/elasticsearch/pull/11453.patch","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/11453","number":11453,"state":"open","locked":false,"title":"Dates: Added epoch date formats to configure parsing of unix dates","user":{"login":"spinscale","id":667544,"avatar_url":"https://avatars.githubusercontent.com/u/667544?v=3","gravatar_id":"","url":"https://api.github.com/users/spinscale","html_url":"https://github.com/spinscale","followers_url":"https://api.github.com/users/spinscale/followers","following_url":"https://api.github.com/users/spinscale/following{/other_user}","gists_url":"https://api.github.com/users/spinscale/gists{/gist_id}","starred_url":"https://api.github.com/users/spinscale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spinscale/subscriptions","organizations_url":"https://api.github.com/users/spinscale/orgs","repos_url":"https://api.github.com/users/spinscale/repos","events_url":"https://api.github.com/users/spinscale/events{/privacy}","received_events_url":"https://api.github.com/users/spinscale/received_events","type":"User","site_admin":false},"body":"This PR adds the support the new date formats, namely `epoch_second` and `epoch_second_millis`. By adding those, we can remove the internal logic to try and parse everything as a unix timestamp first and only then use our regular date format.\r\n\r\nThis PR tries to remain backwards compatible by using `epoch_second_millis||dateOptionalTime` where before only `dateOptionalTime` was used in combination with the parsing.\r\n\r\nSome BWC occured, ie, a date like `10000` is now always a year without any other configuration instead of a unix timestamp.\r\n\r\nAlso, in the current implementation, the `RangeQueryParser` allows to configure a timezone for queries using `from`/`to` unix timestamps, even though the timezone is ignored in the query, as a timestamp is always UTC.\r\n\r\nCloses #5328\r\nRelates #10971","created_at":"2015-06-02T11:56:55Z","updated_at":"2015-06-03T13:25:25Z","closed_at":null,"merged_at":null,"merge_commit_sha":"95725f85fb2a06228ef3d75ce75b1945d783f958","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/11453/commits","review_comments_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/11453/comments","review_comment_url":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/11453/comments","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/9ddf7d8ab4c76784f5032703aa228b4a2afc3499","head":{"label":"spinscale:1506-add-epoch-to-named-date-formats","ref":"1506-add-epoch-to-named-date-formats","sha":"9ddf7d8ab4c76784f5032703aa228b4a2afc3499","user":{"login":"spinscale","id":667544,"avatar_url":"https://avatars.githubusercontent.com/u/667544?v=3","gravatar_id":"","url":"https://api.github.com/users/spinscale","html_url":"https://github.com/spinscale","followers_url":"https://api.github.com/users/spinscale/followers","following_url":"https://api.github.com/users/spinscale/following{/other_user}","gists_url":"https://api.github.com/users/spinscale/gists{/gist_id}","starred_url":"https://api.github.com/users/spinscale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spinscale/subscriptions","organizations_url":"https://api.github.com/users/spinscale/orgs","repos_url":"https://api.github.com/users/spinscale/repos","events_url":"https://api.github.com/users/spinscale/events{/privacy}","received_events_url":"https://api.github.com/users/spinscale/received_events","type":"User","site_admin":false},"repo":{"id":8698747,"name":"elasticsearch","full_name":"spinscale/elasticsearch","owner":{"login":"spinscale","id":667544,"avatar_url":"https://avatars.githubusercontent.com/u/667544?v=3","gravatar_id":"","url":"https://api.github.com/users/spinscale","html_url":"https://github.com/spinscale","followers_url":"https://api.github.com/users/spinscale/followers","following_url":"https://api.github.com/users/spinscale/following{/other_user}","gists_url":"https://api.github.com/users/spinscale/gists{/gist_id}","starred_url":"https://api.github.com/users/spinscale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spinscale/subscriptions","organizations_url":"https://api.github.com/users/spinscale/orgs","repos_url":"https://api.github.com/users/spinscale/repos","events_url":"https://api.github.com/users/spinscale/events{/privacy}","received_events_url":"https://api.github.com/users/spinscale/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/spinscale/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":true,"url":"https://api.github.com/repos/spinscale/elasticsearch","forks_url":"https://api.github.com/repos/spinscale/elasticsearch/forks","keys_url":"https://api.github.com/repos/spinscale/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/spinscale/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/spinscale/elasticsearch/teams","hooks_url":"https://api.github.com/repos/spinscale/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/spinscale/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/spinscale/elasticsearch/events","assignees_url":"https://api.github.com/repos/spinscale/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/spinscale/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/spinscale/elasticsearch/tags","blobs_url":"https://api.github.com/repos/spinscale/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/spinscale/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/spinscale/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/spinscale/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/spinscale/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/spinscale/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/spinscale/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/spinscale/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/spinscale/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/spinscale/elasticsearch/subscription","commits_url":"https://api.github.com/repos/spinscale/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/spinscale/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/spinscale/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/spinscale/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/spinscale/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/spinscale/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/spinscale/elasticsearch/merges","archive_url":"https://api.github.com/repos/spinscale/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/spinscale/elasticsearch/downloads","issues_url":"https://api.github.com/repos/spinscale/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/spinscale/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/spinscale/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/spinscale/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/spinscale/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/spinscale/elasticsearch/releases{/id}","created_at":"2013-03-11T07:47:35Z","updated_at":"2015-03-10T00:44:51Z","pushed_at":"2015-06-03T12:21:36Z","git_url":"git://github.com/spinscale/elasticsearch.git","ssh_url":"git@github.com:spinscale/elasticsearch.git","clone_url":"https://github.com/spinscale/elasticsearch.git","svn_url":"https://github.com/spinscale/elasticsearch","homepage":"http://elasticsearch.org","size":112587,"stargazers_count":2,"watchers_count":2,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":0,"forks":2,"open_issues":0,"watchers":2,"default_branch":"master"}},"base":{"label":"elastic:master","ref":"master","sha":"5fd96d9371f68645ac6ec2ec17c0faeaa21610a8","user":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"repo":{"id":507775,"name":"elasticsearch","full_name":"elastic/elasticsearch","owner":{"login":"elastic","id":6764390,"avatar_url":"https://avatars.githubusercontent.com/u/6764390?v=3","gravatar_id":"","url":"https://api.github.com/users/elastic","html_url":"https://github.com/elastic","followers_url":"https://api.github.com/users/elastic/followers","following_url":"https://api.github.com/users/elastic/following{/other_user}","gists_url":"https://api.github.com/users/elastic/gists{/gist_id}","starred_url":"https://api.github.com/users/elastic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elastic/subscriptions","organizations_url":"https://api.github.com/users/elastic/orgs","repos_url":"https://api.github.com/users/elastic/repos","events_url":"https://api.github.com/users/elastic/events{/privacy}","received_events_url":"https://api.github.com/users/elastic/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/elastic/elasticsearch","description":"Open Source, Distributed, RESTful Search Engine","fork":false,"url":"https://api.github.com/repos/elastic/elasticsearch","forks_url":"https://api.github.com/repos/elastic/elasticsearch/forks","keys_url":"https://api.github.com/repos/elastic/elasticsearch/keys{/key_id}","collaborators_url":"https://api.github.com/repos/elastic/elasticsearch/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/elastic/elasticsearch/teams","hooks_url":"https://api.github.com/repos/elastic/elasticsearch/hooks","issue_events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/events{/number}","events_url":"https://api.github.com/repos/elastic/elasticsearch/events","assignees_url":"https://api.github.com/repos/elastic/elasticsearch/assignees{/user}","branches_url":"https://api.github.com/repos/elastic/elasticsearch/branches{/branch}","tags_url":"https://api.github.com/repos/elastic/elasticsearch/tags","blobs_url":"https://api.github.com/repos/elastic/elasticsearch/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/elastic/elasticsearch/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/elastic/elasticsearch/git/refs{/sha}","trees_url":"https://api.github.com/repos/elastic/elasticsearch/git/trees{/sha}","statuses_url":"https://api.github.com/repos/elastic/elasticsearch/statuses/{sha}","languages_url":"https://api.github.com/repos/elastic/elasticsearch/languages","stargazers_url":"https://api.github.com/repos/elastic/elasticsearch/stargazers","contributors_url":"https://api.github.com/repos/elastic/elasticsearch/contributors","subscribers_url":"https://api.github.com/repos/elastic/elasticsearch/subscribers","subscription_url":"https://api.github.com/repos/elastic/elasticsearch/subscription","commits_url":"https://api.github.com/repos/elastic/elasticsearch/commits{/sha}","git_commits_url":"https://api.github.com/repos/elastic/elasticsearch/git/commits{/sha}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/comments{/number}","issue_comment_url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments{/number}","contents_url":"https://api.github.com/repos/elastic/elasticsearch/contents/{+path}","compare_url":"https://api.github.com/repos/elastic/elasticsearch/compare/{base}...{head}","merges_url":"https://api.github.com/repos/elastic/elasticsearch/merges","archive_url":"https://api.github.com/repos/elastic/elasticsearch/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/elastic/elasticsearch/downloads","issues_url":"https://api.github.com/repos/elastic/elasticsearch/issues{/number}","pulls_url":"https://api.github.com/repos/elastic/elasticsearch/pulls{/number}","milestones_url":"https://api.github.com/repos/elastic/elasticsearch/milestones{/number}","notifications_url":"https://api.github.com/repos/elastic/elasticsearch/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/elastic/elasticsearch/labels{/name}","releases_url":"https://api.github.com/repos/elastic/elasticsearch/releases{/id}","created_at":"2010-02-08T13:20:56Z","updated_at":"2015-06-03T12:56:54Z","pushed_at":"2015-06-03T12:58:03Z","git_url":"git://github.com/elastic/elasticsearch.git","ssh_url":"git@github.com:elastic/elasticsearch.git","clone_url":"https://github.com/elastic/elasticsearch.git","svn_url":"https://github.com/elastic/elasticsearch","homepage":"https://www.elastic.co/products/elasticsearch","size":1901235,"stargazers_count":11449,"watchers_count":11449,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3619,"mirror_url":null,"open_issues_count":1098,"forks":3619,"open_issues":1098,"watchers":11449,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/11453"},"html":{"href":"https://github.com/elastic/elasticsearch/pull/11453"},"issue":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/11453"},"comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/issues/11453/comments"},"review_comments":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/11453/comments"},"review_comment":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/elastic/elasticsearch/pulls/11453/commits"},"statuses":{"href":"https://api.github.com/repos/elastic/elasticsearch/statuses/9ddf7d8ab4c76784f5032703aa228b4a2afc3499"}}}}