BrandGhost
Datetime Made Easy with This ONE C# Dapper Trick!

Datetime Made Easy with This ONE C# Dapper Trick!

DateTime, DateTimeOffset, and... well, ANYTHING with dates, times, and time zones can be a huge pain in the butt in DotNet. DateTimeOffset has made some of this stuff feel much better in our applications because it can carry around with it the time zone offset along with the DateTime itself. Awesome! But have you found in your applications that you're writing UTC DateTimes to databases and then reading those DateTimes back? If you're not careful, you'll lose the implicit UTC time zone information. But there's a handy trick we can use with Dapper as we'll see in this tutorial!
An error has occurred. This application may no longer respond until reloaded. Reload