Why DateTimeOffset.Date returns DateTime instead of DateTimeOffset? #98626
Unanswered
christallire
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Because at the time Note that by removing the time information you're also removing anything that would allow you to tie back to a time zone anyhow, so a change in time zone is to be expected. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It needs to be more straightforward. It's not foolproof enough.
I was scratching my head because it changed the variable's timezone unnoticed.
for an example:
Beta Was this translation helpful? Give feedback.
All reactions