Skip to content

Conversation

dentiny
Copy link
Contributor

@dentiny dentiny commented Feb 28, 2025

Resolve the second part for #596 (TIMETZ conversion).

Fixes #596


TimeTzADT *result = static_cast<TimeTzADT *>(palloc(sizeof(TimeTzADT)));
result->time = micros;
result->zone = -tz_offset;
Copy link
Collaborator

@JelteF JelteF Feb 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why use - in this line? That's unexpected and easy to miss enough that I think it deserves a comment. (same for conversion the other way around)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Totally makes sense, add a comment on how pg/duckdb stores timezone.

Copy link
Collaborator

@JelteF JelteF left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, except for some code comments that should be added for clarity.

@JelteF JelteF merged commit 042b129 into duckdb:main Mar 3, 2025
5 checks passed
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.

Add support for TIME and TIME_TZ types
2 participants