kuzudb / explorer

Browser-based user interface for Kùzu graph database
https://hub.docker.com/r/kuzudb/explorer
MIT License
34 stars 5 forks source link

Timestamp shows result in local timezone rather than UTC #84

Closed prrao87 closed 8 months ago

prrao87 commented 8 months ago

I provide timestamp data in a CSV file of the format 2023-12-27 04:23:04. Without specifying any timezone offset, the default behaviour in Kùzu is to treat this as UTC (which is expected).

However, when I ingest the data into a Kùzu table and visualize it in explorer, I see the timestamp as this: 2023-12-26 23:23:04, which is UTC - 5, which is my timezone.

Unexpected behaviour

The explorer incorrectly makes the assumption that the user wants the timestamp shown in their local time zone, without telling them the timezone itself. This can cause the user to believe that the timestamp they're shown is in UTC, which it's not (whereas Kùzu's storage layer also correctly stores as UTC).

In the explorer UI, this is how it looks (no TZ info or offsets specified):

image

Expected behaviour

The explorer should ideally obtain the TZ info from Kùzu's internal storage (which correctly parses this as UTC) and show the timezone, if possible, in the UI so that the user knows what time offsets are in the timestamp.

2023-12-27 04:23:04 should be shown as 2023-12-27 04:23:04Z or something similar to indicate that we've parsed and stored the time internally as UTC.