Oracle Timestamp with Time Zone not being mapped to DateTimeOffset properly
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 18.4k
- Forks
- 3.7k
- Avg merge
- 5h 8m
- Merged PRs (30d)
- 1
Description
I have a created date column with type of Timestamp with Time Zone in oracle. My C# model property type is a DateTimeOffset. It sets the value, but it loses the offset portion.
I tried writing my own custom type handler, but the object value that gets passed to the parse method is already a DateTime object, and has already lost the offset value of the data at that point.
The issue is reader => handler.Parse(type, reader.GetValue(startBound));
reader.GetValue(startBound) returns a DateTime at that point.
We need to be able to change it to reader.GetDateTimeOffset() or have some sort of lower level extension point.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at the mapping expression reader => handler.Parse(type, reader.GetValue(startBound)) and trace how the Oracle timestamp value reaches the type handler. Verify whether GetDateTimeOffset() or a lower-level extension point can preserve the offset, then confirm that a C# DateTimeOffset property receives it correctly. No test file or implementation path is named in the issue, so locate the relevant mapping tests before defining completion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, sql
- Domain
- backend, databases
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100