There's a lot of stories around how to have Dapper assign all DateTimes
coming back from a query as Utc.
However, my database actually uses the Date
data type when we don't care about the time of an event (say, a 'due date'). Unfortunately, this gets converted to a UTC DateTime
in C#. This causes some havoc with date picker UIs, which seem to have strange behavior for users across time zones.
Is there a mechanism within Dapper to capture when a Date
field is being converted to a DateTime and set the DateTimeKind
differently? Or force specific TypeHandler to be used for certain columns?