Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DuckDBTimestampTZValue toString should include timezone offset #102

Open
jraymakers opened this issue Jan 4, 2025 · 0 comments
Open

DuckDBTimestampTZValue toString should include timezone offset #102

jraymakers opened this issue Jan 4, 2025 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@jraymakers
Copy link
Contributor

The current implementation of toString for DuckDBTimestampTZValue doesn't include the timezone offset.

The main challenge is getting the appropriate timezone information to this method. Calculating the necessary timezone offset in hours and minutes is currently only possible by running a SQL expression (select timezone_hour(current_timestamp), timezone_minute(current_timestamp);). Since it's not reasonable to run SQL every time toString is called, this information should be gathered and stored somewhere else, perhaps in a global.

Most of the time, the user is likely to want to use whatever timezone the machine is set to. But, in some scenarios, the user may want to set a different timezone. Ensuring the global state that controls the timezone display is in sync with the DuckDB TimeZone setting could prove a challenge. But perhaps for this advanced use case it's okay to require an additional call from the user to update the global state for the updated timezone setting.

@jraymakers jraymakers added the enhancement New feature or request label Jan 4, 2025
@jraymakers jraymakers self-assigned this Jan 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant