Skip to content

Commit 3900a2e

Browse files
authored
feat: Instants and ZonedDateTimes should be treated as DateTimes (#1117)
deephaven/deephaven-core#3385 is a port of DH-11692 which adds `Instant` and `ZonedDateTime` support to the engine. I've similarly encoded these types over Barrage as a `long` (as a nanosecond since epoch). The encoding of Zones will actually need to be implemented at a future date as the best implementation requires (encourages?) a much larger refactoring of ColumnSource types. See deephaven/deephaven-core#3455 for more information. I was able to get the web-client-ui to display these types with this small patch.
1 parent ffb7ada commit 3900a2e

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

packages/jsapi-utils/src/TableUtils.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,8 @@ export class TableUtils {
312312
case 'io.deephaven.db.tables.utils.DBDateTime':
313313
case 'io.deephaven.time.DateTime':
314314
case 'com.illumon.iris.db.tables.utils.DBDateTime':
315+
case 'java.time.Instant':
316+
case 'java.time.ZonedDateTime':
315317
case TableUtils.dataType.DATETIME:
316318
return TableUtils.dataType.DATETIME;
317319
case 'double':
@@ -351,6 +353,8 @@ export class TableUtils {
351353
switch (columnType) {
352354
case 'io.deephaven.db.tables.utils.DBDateTime':
353355
case 'io.deephaven.time.DateTime':
356+
case 'java.time.Instant':
357+
case 'java.time.ZonedDateTime':
354358
case 'com.illumon.iris.db.tables.utils.DBDateTime':
355359
return true;
356360
default:

0 commit comments

Comments
 (0)