I do not use the
Mapper[
^] lib, but, for a better understanding of how they work, I will give you examples of doing it manually.
Below are examples of working with the
DateTime[
^] and
DateTimeOffset[
^], using
TimeZoneInfo[
^]:
using System.Diagnostics;
const string dateString = "2012-11-20T00:00:00Z";
TimeZoneInfo timezone = TimeZoneInfo
.FindSystemTimeZoneById("W. Europe Standard Time");
DateTimeOffset utc = DateTimeOffset.Parse(dateString);
DateTimeOffset result = TimeZoneInfo.ConvertTime(utc, timezone);
Debug.Assert(result.Offset == new TimeSpan(1, 0, 0));
Debug.Assert(result.UtcDateTime == new DateTime(2012, 11, 20, 0, 0, 0));
Debug.Assert(result.DateTime == new DateTime(2012, 11, 20, 1, 0, 0));
Lastly, for Mapper, it appears that you need to use a
Custom Type Converter[
^]. The above example should help you in doing this.