DateTimeOffset loses time zone offset
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 35/100
Research direction
The issue does not name a file or test. Start by locating the DateTimeOffset persistence and conversion code, then reproduce the round trip described in the issue. Done means reading a stored DateTimeOffset preserves its original time zone offset while representing the same moment.
Written by the indexing model from the issue text.
Description
DateTimeOffset is stored as UTC ticks. The consequence is that the data read back lacks the time zone offset; however, it still accurately represents the correct moment in time.
Store this: "2014-06-11T20: 24: 01.8325787-07: 00"
You read back: "2014-06-12T03: 24: 01.8325787+00: 00"
They represent the same moment in time, but the first contained a timezone offset.
A work around is to store a DateTimeOffset's 'Offset' and 'Ticks' separately and rebuild an accurate DateTimeOffset on read. This does mean range queries are more difficult.
- Dominant language
- C#
- Stars
- 4.5k
- Forks
- 1.4k
- PR merge metrics
- No merged PRs in 30d
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.
More from praeclarum/sqlite-net
-
Feature Up for Grabs
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
praeclarum/sqlite-net#609 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
praeclarum/sqlite-net#1308 · 6 comments · 1 reaction ·
-
Difficulty 4/5 3-5 days Newbie friendliness 52/100
praeclarum/sqlite-net#1307 · 23 comments · 7 reactions ·
-
Difficulty 4/5 3-5 days Newbie friendliness 45/100
praeclarum/sqlite-net#1300 · 1 comment ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
praeclarum/sqlite-net#1299 · 6 comments ·
All issues in praeclarum/sqlite-net
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
:watch: Not Triaged 11.0 fundamentals/subsvc
Difficulty 2/5 1-3 hours Newbie friendliness 92/100
dotnet/AspNetCore.Docs#37699 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SubtitleEdit/subtitleedit#15108 · 1 comment ·
-
area/docs-content Bug pulumi/docs
Difficulty 1/5 1-3 hours Newbie friendliness 94/100
-
agentic-workflows untriaged
Difficulty 2/5 1-3 hours Newbie friendliness 76/100