-
-
Notifications
You must be signed in to change notification settings - Fork 73
Description
We have legacy code that supports multiple database systems and had been using:
DateTime dt = Convert.ChangeType(valueReturnedFromQuery, typeof(DateTime));
to get the datetime values. This works fine in our Firebird 3 systems, but in testing out migrating to Firebird 5, this throws the Exception:
System.InvalidCastException: 'Object must implement IConvertible.'
Is there a reason FBZonedDateTime does not implement IConvertible? It could return the DateTime in the local users time or UTC time.
This functionality could be behind an AppContext switch, much the same way Npgsql has done (Ngsql.EnableLegacyTimestampBehavior), where essentially DbDataType.TimeStampTZ is treated as DbDataType.TimeStamp