Class UtcDateTimeOffsetConverter
- Namespace
- NuvTools.Data.EntityFrameworkCore.Conventions
- Assembly
- NuvTools.Data.EntityFrameworkCore.dll
Stores every DateTimeOffset in UTC: whatever offset a value arrives with (a browser in Brasília sends -03:00), the column holds the same instant at +00:00. Values are read back as stored.
public class UtcDateTimeOffsetConverter : ValueConverter<DateTimeOffset, DateTimeOffset>
- Inheritance
-
UtcDateTimeOffsetConverter
- Inherited Members
Remarks
Applied to a whole model by StoreDateTimesInUtc(ModelConfigurationBuilder).
Constructors
UtcDateTimeOffsetConverter()
Stores every DateTimeOffset in UTC: whatever offset a value arrives with (a browser in Brasília sends -03:00), the column holds the same instant at +00:00. Values are read back as stored.
public UtcDateTimeOffsetConverter()
Remarks
Applied to a whole model by StoreDateTimesInUtc(ModelConfigurationBuilder).