Skip to content

Rendering of timestamps before 1970-01-01 (negative values in BIGINT) shows "Invalid Timestamp" #839

Open

Description

Issue:

The AdminUI automatically renders TIMESTAMP fields, which is very convenient.

Anyway, negative millisecond values are valid for dates that are before January 1970.

The following statement demonstrates the issue, the positive timestamp is rendered correctly, the negative one not:

-- Correct:
select ('1970-01-01T00:00:00.001000Z')::TIMESTAMP, date_format(1), (1)::TIMESTAMP limit 100;

-- Result
1 (1970-01-01T00:00:00.001Z) | 1970-01-01T00:00:00.001000Z | 1 (1970-01-01T00:00:00.001Z)

-- Incorrect:
select ('1969-12-31T23:59:59.999000Z')::TIMESTAMP, date_format(-1), (-1)::TIMESTAMP limit 100;

-- Result:
-1 (Invalid Timestamp) | 1969-12-31T23:59:59.999000Z | -1 (Invalid Timestamp)

Workaround:
The issue is not really a problem, just confusing - I thought that my import is wrong, until I figured out this is only a rendering issue.

The date_format() function works properly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions