DateTimeOffsetToFirebirdZonedDateTimeResolver

A class used to resolve a DateTimeOffset into the FbZonedDateTime value that is written into a Firebird TIMESTAMP WITH TIME ZONE column.

This IResolver<DateTimeOffset, object> implementation converts a DateTimeOffset into the FbZonedDateTime (boxed) that the FirebirdSql.Data.FirebirdClient driver writes into a TIMESTAMP WITH TIME ZONE column. The value holds the UTC date and time, and the offset as the name of a fixed-offset Etc/GMT time zone, resolved by the TimeSpanToFirebirdTimeZoneNameResolver. It is used by the FirebirdZonedDateTimeToDateTimeOffsetPropertyHandler and the FirebirdZonedDateTimeToNullableDateTimeOffsetPropertyHandler when writing the entity property back to the database.

The counterpart of this class is the FirebirdZonedValueToDateTimeOffsetResolver, which converts the value read from the column back into a DateTimeOffset. For a TIME WITH TIME ZONE column, use the DateTimeOffsetToFirebirdZonedTimeResolver.

Usability

var resolver = new DateTimeOffsetToFirebirdZonedDateTimeResolver();
var value = resolver.Resolve(new DateTimeOffset(2026, 9, 21, 10, 30, 0, TimeSpan.FromHours(3)));
// FbZonedDateTime, 2026-09-21 07:30:00 UTC in the "Etc/GMT-3" time zone (boxed)

Constructors

Constructor Description
DateTimeOffsetToFirebirdZonedDateTimeResolver() Creates a new instance using the TimeSpanToFirebirdTimeZoneNameResolver.
DateTimeOffsetToFirebirdZonedDateTimeResolver(IResolver<TimeSpan, string> timeZoneNameResolver) Creates a new instance using the custom resolver that converts the UTC offset into the name of a Firebird time zone.