Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Timepicker] Does not allow dates before the Epoch #30420

Closed
tsullivan opened this issue Feb 7, 2019 · 3 comments
Closed

[Timepicker] Does not allow dates before the Epoch #30420

tsullivan opened this issue Feb 7, 2019 · 3 comments
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:Timepicker Timepicker Team:Visualizations Visualization editors, elastic-charts and infrastructure

Comments

@tsullivan
Copy link
Member

Kibana version: master

Elasticsearch version: master/8.0

Steps to reproduce:

  1. Use the test data:

    PUT /restaurant
    {"settings":{"number_of_shards":1,"number_of_replicas":0},"mappings":{"properties":{"@date":{"type":"date"},"key":{"type":"keyword"},"type":{"type":"keyword"},"metric":{"type":"integer"}}}}
    
    
    POST /restaurant/_bulk
    {"index":{}}
    {"@date":"1900-02-07T18:53:06Z","key":"dinner","metric":8936}
    {"index":{}}
    {"@date":"1950-10-09T02:53:06Z","key":"dinner","metric":90}
    {"index":{}}
    {"@date":"1970-06-09T10:53:06Z","key":"dinner","type":"orders","metric":1628}
    {"index":{}}
    {"@date":"1990-02-07T18:53:06Z","key":"dinner","metric":4486}
    
  2. Create the restaurant index pattern and set the timefield to @date

  3. View it in Discover

  • Viewing ~ 40 years ago works
  • Viewing ~ 50 years ago breaks
    Discover: failed to parse date field [-28270904493] with format [epoch_millis]: [Text '-28270904493' could not be parsed: Invalid value for NanoOfSecond (valid values 0 - 999999999): -493000000]
    
  1. Absolute and Relative are both affected

image

Regression

  • In the previous timepicker, using Relative format would have the same bug
  • Using Absolute format was a workaround
@tsullivan tsullivan added bug Fixes for quality problems that affect the customer experience Feature:Timepicker Timepicker labels Feb 7, 2019
@tsullivan
Copy link
Member Author

tsullivan commented Feb 7, 2019

Note: to test if this is a regression, I tried git revert 6ad036b187 and tested using the old timepicker

6ad036b is from #29204

@tsullivan tsullivan added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Feb 7, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app

@flash1293
Copy link
Contributor

It seems like elasticsearch doesn't accept negative epoch_millis values anymore since 7.0 but I don't find any documentation on this. @tsullivan could this be an elasticsearch regression (maybe related to the removal of joda time)?

I started work on a PR to fix this on our side by switching to another date format but this has some disadvantages so it would be nice to resolve this on elasticsearch side.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Timepicker Timepicker Team:Visualizations Visualization editors, elastic-charts and infrastructure
Projects
None yet
Development

No branches or pull requests

4 participants