Skip to content

fix: incorrect timestamp inserted to duckdb#27

Open
yeahbai08 wants to merge 1 commit into
mmzeeman:masterfrom
yeahbai08:fix-timestamp
Open

fix: incorrect timestamp inserted to duckdb#27
yeahbai08 wants to merge 1 commit into
mmzeeman:masterfrom
yeahbai08:fix-timestamp

Conversation

@yeahbai08

Copy link
Copy Markdown

educkdb inserted an incorrect timestamp to database.

DuckDB represents instants as the number of microseconds (µs) (or nanoseconds, for TIMESTAMP_NS) since 1970-01-01 00:00:00+00.

https://duckdb.org/docs/sql/data_types/timestamp

@mmzeeman

Copy link
Copy Markdown
Owner

The epoch is there to make it easier to insert timestamps from erlang. In Erlang timestamps are usually made in Gregorian days. See: https://www.erlang.org/doc/apps/stdlib/calendar.html

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants