DarkWanderer / ClickHouse.Client

.NET client for ClickHouse
MIT License
315 stars 62 forks source link

system.dateonly' to type 'system.iconvertible' #341

Closed exitxhu closed 1 year ago

exitxhu commented 1 year ago

hello im currentlu developing a database provider for EF based on your client, and that's going well. but there is an issue while using DateOnly type. I'm currently using lates version available: 6.7.2 i narrow it down to this method: HttpParameterFormatter.Format()

case DateType dt:
                return Convert.ToDateTime(value, CultureInfo.InvariantCulture).ToString("yyyy-MM-dd", CultureInfo.InvariantCulture);

the issue is Convert class dose not support that cast :

Convert.ToDateTime(new DateOnly(), CultureInfo.InvariantCulture)

which throws InvalidCastException: Unable to cast object of type 'System.DateOnly' to type 'System.IConvertible'

can you fix it? tnx in advance

DarkWanderer commented 1 year ago

Hi. Please try release 6.7.3

exitxhu commented 1 year ago

totally fixed great work keep it up