zhaoyongjie opened a new pull request #11079:
URL: https://github.com/apache/incubator-superset/pull/11079


   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   My local environment timezone is UTF+8, when I run jest, failed.
   ```
   $  jest spec/javascripts/explore/components/DateFilterControl_spec.jsx
   .....
     ● DateFilterControl › renders the correct time range in tooltip
   
       expect(received).toEqual(expected) // deep equality
   
       Expected: "2020-09-06 < col < 2020-09-07"
       Received: "2020-09-05 < col < 2020-09-06"
   ```
   
   the root cause is , new Date('09/07/2020') => Date Mon Sep 07 2020 00:00:00 
GMT+0800 (China Standard Time).
   
   so we need construct a UTC datetime using new Date('2020-09-07')
   
   reference: 
   
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/Date
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to