DateTime vs DateTimeOffset #108488
Replies: 2 comments 2 replies
-
Take a look at nodatime. It has extensive time zone support based on IANA's time zone database (see here: https://nodatime.org/TimeZones). Nodatime's equivalent for the DateTime+TimeZone combo is I think i'm not going out on a limb here by saying nodatime is the go-to library for anyone who needs more date/time-related features than DateTime/DateTimeOffset offers. (nuget lists a whopping 157 million downloads for nodatime) |
Beta Was this translation helpful? Give feedback.
-
I could have sworn we had an open issue for this, but I'm not finding it at the moment. |
Beta Was this translation helpful? Give feedback.
-
Hi all;
I have found DateTimeOffset to be problematic. The big problems are:
What I came up with decades ago, and it has worked great, is to treat it as a combined DateTime+TimeZone. I wrote a class DateTimeZone which does this. I have it up on GitHub and NuGet.
Hopefully this will help those of you hitting the same issues I hit with DateTimeOffset.
thanks - dave
Beta Was this translation helpful? Give feedback.
All reactions