beakerx icon indicating copy to clipboard operation
beakerx copied to clipboard

beakerx grid converts datetime objects to match browser time zone

Open jdavidheiser opened this issue 6 years ago • 2 comments

We work in UTC pretty regularly, and the phosphorjs grid used to display datetimes automatically converts them to match the time zone of the browser. This means that the dates frequently do not line up, and can be really confusing.

This seems like a really counter-intuitive setting to default to - I would assume most users would want to see times displayed exactly as they are stored in the data type, rather than converting them before display.

Example of datetimes being displayed converted for browser time zone

jdavidheiser avatar Jul 17 '18 19:07 jdavidheiser

@MariuszJurowicz It looks like you've worked a lot on https://github.com/twosigma/beakerx/blob/master/js/notebook/src/tableDisplay/dataGrid/DataFormatter.ts, what do you think about the following changes?

  • Update DEFAULT_TIME_FORMAT to something a bit more standard that matches the formatting you would expect to see elsewhere in Jupyter notebooks, like YYYY-MM-DD with dashes.
  • provide an option to call moment.tz.setDefault somewhere in the beakerx config
    • maybe default to UTC instead of getting the user's time zone?

jdavidheiser avatar Aug 10 '18 22:08 jdavidheiser

@jdavidheiser Is there any update on this issue? I'm seeing the same problem and would ideally like to be able to call moment.tz.setDefault. How would you set the default from the client side?

Ben-Epstein avatar Sep 02 '20 13:09 Ben-Epstein