{"action":"created","issue":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/10971","labels_url":"https://api.github.com/repos/elastic/elasticsearch/issues/10971/labels{/name}","comments_url":"https://api.github.com/repos/elastic/elasticsearch/issues/10971/comments","events_url":"https://api.github.com/repos/elastic/elasticsearch/issues/10971/events","html_url":"https://github.com/elastic/elasticsearch/issues/10971","id":73238654,"number":10971,"title":"Mapping: Improve date handling","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},"labels":[{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/:Dates","name":":Dates","color":"009800"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/Meta","name":"Meta","color":"e11d21"},{"url":"https://api.github.com/repos/elastic/elasticsearch/labels/v2.0.0","name":"v2.0.0","color":"dddddd"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-05-05T07:42:29Z","updated_at":"2015-06-09T07:15:07Z","closed_at":null,"body":"In order to improve the handling of dates in elasticsearch, we need to work on several things. This is a collecting issue\r\n\r\n* [x] Add `epoch_ms` and `epoch_seconds` to named date formats, see #5328 - this allows us to parse dates like `YYYYMMddHHmmss`, right now those are converted to unix timestamps\r\n* [ ] Make date format strings strict, something like `dateOptionalTime` should be strict by default, meaning that a year has to have 4 digits, a months two and so on. Initial work has been done in #6227 - this also should fix issues like #1694 and #6158\r\n* [ ] Make date formats strict. Example by using fixed decimals (by default joda time is very lenient)\r\n```java\r\nDateTimeFormatter formatter = new DateTimeFormatterBuilder()\r\n    .appendFixedDecimal(DateTimeFieldType.year(),4)\r\n    .appendFixedDecimal(DateTimeFieldType.monthOfYear(),2)\r\n    .appendFixedDecimal(DateTimeFieldType.dayOfMonth(),2)\r\n    .toFormatter()\r\n    .withZoneUTC();\r\n```\r\n* [ ] Both suggestions above imply falling back to old parsing with older indices. \r\n* [ ] Fix dynamic mapping for dates with periods (like german), issue #10961 - several solutions, either fix the mentioned source code line as an easy start or check the mapping and extract valid characters that do not imply a date format"},"comment":{"url":"https://api.github.com/repos/elastic/elasticsearch/issues/comments/110256034","html_url":"https://github.com/elastic/elasticsearch/issues/10971#issuecomment-110256034","issue_url":"https://api.github.com/repos/elastic/elasticsearch/issues/10971","id":110256034,"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},"created_at":"2015-06-09T07:15:06Z","updated_at":"2015-06-09T07:15:06Z","body":"@simianhacker yes it does. When creating a range query in kibana, do you always use a unix timestamp or just in this example?"}}