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

Don't discard the timezone information when reading timezone with tim… #196

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

olivierdeckers
Copy link

…estamp from the database

@guizmaii
Copy link
Member

guizmaii commented Apr 6, 2024

Which DB are you using?

@olivierdeckers
Copy link
Author

olivierdeckers commented Apr 6, 2024 via email

@olivierdeckers
Copy link
Author

Is there anything else you need to get more confidence on this change?

@guizmaii
Copy link
Member

@olivierdeckers Can you please add some tests?

} yield zConnection
)

case class OffsetDateTimeRow(value: OffsetDateTime)
Copy link
Author

Choose a reason for hiding this comment

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

When using query[OffsetDateTime] directly things were working already, the code path I changed in JdbcDecoder is only hit when using the JdbcDecoder.fromSchema

Copy link
Author

Choose a reason for hiding this comment

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

Without the change, the case class would have had to have an Instant field instead of an OffsetDateTime field.
The data would be returned in the default system timezone, but interpreted as a timestamp in UTC. Where I live this results in a 2 hour offset currently between writing and reading an OffsetDateTimeRow

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