DateTime serializes to Local Time
The CsvReader serializer is transforming the string "2017-01-09T00:01:47.6145940Z" into local time, But I need to keep the records in UTC.
There is no way to select the DateTimeStyle in the configuration
using (var reader = new StreamReader(lakeStream))
using (var csv = new CsvReader(reader, new CsvConfiguration()
{
HasHeaderRecord = hasHeaderRecord,
Delimiter = delimiter,
IgnoreBlankLines = true,
IsHeaderCaseSensitive = false,
//Missing DateTimeStyle = DateTimeStyle.AssumeUniversal
}))
{
rows = csv.GetRecords<T>().ToList();
}
You could introduce something that parses it as DateTimeOffset - you have a better chance of it coping if you preserve the timezone information.
Happy to accept a pull request