Skip to content

Conversation

@codetyri0n
Copy link
Contributor

Which issue does this PR close?

Closes #18228

What changes are included in this PR?

timezone config options support and subsequent results produced aware of the set timezone

Are these changes tested?

slt

Are there any user-facing changes?

yes

@github-actions github-actions bot added documentation Improvements or additions to documentation sqllogictest SQL Logic Tests (.slt) functions Changes to functions implementation labels Nov 29, 2025
pub mod to_timestamp;
pub mod to_unixtime;

// Adjusts a timestamp to local time by applying the timezone offset.
Copy link
Contributor Author

@codetyri0n codetyri0n Nov 29, 2025

Choose a reason for hiding this comment

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

adjust_to_local_time refactored to mod.rs as a common helper function for both date_part and to_local_time

CC: @martin-g

EXTRACT(SECOND FROM TIMESTAMP '2024-01-01 03:05:59+08:45');
----
2023 12 31 18 20 59

Copy link
Contributor Author

Choose a reason for hiding this comment

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

tested with postive and negative offset timezones such as Asia/Kolkata and America/New_York

@codetyri0n
Copy link
Contributor Author

codetyri0n commented Nov 29, 2025

Really sorry that the previous PR was closed because I forgot to git add via the IDE before force pushing the conflicts that were resolved with main 😭 💀

BUT HOWEVER:

  • all previous comments and objective of the issue are addressed with this and hope it is fit for approval/merge (pending latest comments, if any)

@Omega359 @martin-g

@codetyri0n
Copy link
Contributor Author

thank you for the improvements! @martin-g

@Omega359
Copy link
Contributor

I'll try and do a full review of this today or tomorrow, thanks for the work on it

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

Labels

documentation Improvements or additions to documentation functions Changes to functions implementation sqllogictest SQL Logic Tests (.slt)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Extract sql expression no longer is timezone aware

3 participants