TableDisplay misses correct time of day
- Dominant language
- Jupyter Notebook
- Stars
- 2.9k
- Forks
- 383
- PR merge metrics
- No merged PRs in 30d
Description
I have a CSV table like so:
```csv
time,energyCounterKWH
2018-01-01T11:00:00.000,100.0
2018-01-01T11:05:00.000,101.0
2018-01-01T11:10:00.000,103.0
....
```
Within a Java cell, I load this CSV into a TableSaw table and let the table be displayed:
```java
%classpath add mvn tech.tablesaw tablesaw-core 0.12.0
%classpath add mvn tech.tablesaw tablesaw-plot 0.12.0
%classpath add mvn tech.tablesaw tablesaw-smile 0.12.0
%classpath add mvn tech.tablesaw tablesaw-beakerx 0.12.0
tech.tablesaw.beakerx.TablesawDisplayer.register();
import tech.tablesaw.api.*;
Table test = Table.read().csv("sampleData.csv");
System.out.println(test.column(0).columnMetadata().getType());
System.out.println(test.get(1,0));
return test;
```
`System.out.println` outputs (correctly):
```
LOCAL_DATE_TIME
2018-01-01T11:05:00.000
```
where the resulting Table lacks the information about time of the day:

As the registered TablesawDisplay looks like this:
```java
public static void register() {
Displayers.register(Table.class, new Displayer() {
@Override
public Map display(Table table) {
new TableDisplay(
table.rowCount(),
table.columnCount(),
table.columnNames(),
new TableDisplay.Element() {
@Override
public String get(int columnIndex, int rowIndex) {
return table.get(rowIndex,columnIndex);
}
}
).display();
return OutputCell.DISPLAYER_HIDDEN;
}
});
}
```
And is thus using the `Table::get` function, which delivers the ISO conformant `String` representation like printed above `2018-01-01T11:05:00.000`, I suppose, it is sent to BeakerX as JSON and BeakerX parses it incorrectly (As the output is formatted in non ISO conformant way). => I suspect the TableDisplay parser of that ISO string to somehow miss the time of the day and parsing the date only?!
And a question en top: Do I have any way to format the output differently? Like I want to be ISO conformant and thus have the - between year and month. And I'd like to suppress the offset.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.