Skip to content

Conversation

@SergeiPavlov
Copy link
Contributor

@SergeiPavlov SergeiPavlov commented Jun 6, 2022

Experimental implementation for MSSQL only

Enabled by conditional compilation for .NET6

It can be disabled by setting env var DO_DATEONLY=false or by property in User.Directory.Build.props

@alex-kulakov
Copy link
Contributor

This is great PR! I appreciate it. I'll merge it to a proxy branch where I add support for these times to other providers.

@alex-kulakov
Copy link
Contributor

But instead of DO_DATEONLY I would use the built-in NET6 compile time variable, so I will remove this env var mentions from the code, are you OK with it?

@SergeiPavlov
Copy link
Contributor Author

SergeiPavlov commented Nov 28, 2022

But instead of DO_DATEONLY I would use the built-in NET6 compile time variable, so I will remove this env var mentions from the code, are you OK with it?

It would be Ok for us but not for other DO users.
DateOnly type is supported for SqlServer only.

But if you can implements other providers, then OK

With other DB engine the tests will fail under .NET6 without DO_DATEONLY conditional compilation

@alex-kulakov
Copy link
Contributor

alex-kulakov commented Nov 29, 2022

SQL's date and time are supported by the majority of RDBMSs. Client libraries can be a problem, but we can do the same as we did for DateTimeOffset - make them unsupported. But I think we will have no problems especially if there is a way to read SQL's date as DateTime value and time as something else and then convert them to DateOnly and TimeOnly respectively.

@alex-kulakov alex-kulakov changed the base branch from master to master-date-and-time-support November 30, 2022 07:07
@alex-kulakov alex-kulakov merged commit bd8f3f4 into DataObjects-NET:master-date-and-time-support Nov 30, 2022
@SergeiPavlov SergeiPavlov deleted the upstream/dateonly branch November 30, 2022 17:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants