Update 达梦 time to TimeOnly

This commit is contained in:
sunkaixuan
2025-04-16 09:48:25 +08:00
parent a8fd3dffb1
commit 98bd790a1a

View File

@@ -614,6 +614,10 @@ namespace SqlSugar
{
value = Convert.ToDateTime(value).TimeOfDay;
}
else if (value is DateTime && destinationType.FullName == "System.TimeOnly")
{
value = Convert.ToDateTime(value).TimeOfDay;
}
var destinationConverter = TypeDescriptor.GetConverter(destinationType);
if (destinationConverter != null && destinationConverter.CanConvertFrom(value.GetType()))
return destinationConverter.ConvertFrom(null, culture, value);