Skip to content

Conversation

MrDoe
Copy link
Contributor

@MrDoe MrDoe commented Mar 13, 2024

I fixed two major problems concerning the handling of DateTime64 data:

  • Unix timezones from the server, e.g. 'Europe/Berlin' couldn't be converted to Windows timezones like 'W. European Standard Time' when using a Windows client
  • Due to wrong DST calculations, the time of DateTimeOffset columns before 01-01-1970 was sometimes shifted and the displayed timezone offset was wrong, too. I noticed this after reading a table containing birthdates. Even the month or year was sometimes wrong, if someone was born at the end of a month or year.
    I couldn't get this to work correctly with standard .NET functions, so I integrated the NodaTime library for this.
    The problem is, that the Windows timezone database does not have historical data, only data enough to cover more recent times. So the timezones with DST have no dynamic adjustment rules before 1970-01-01. NodaTime however does include the necessary historic data to do the DST calculations right.
    See NodaTime Blog for a more deeper explanation.

Note:

  • I removed support for netcoreapp3.1 and net6.0, because I didn't want to install these legacy frameworks on my PC. Don't merge the respective line in the .csproj file, if you still want to support them.
  • The tests for DateTime and DateTime64 are still failing, because they need to be rewritten for NodaTime data types.

@victor-sushko victor-sushko self-assigned this Mar 14, 2024
MrDoe and others added 24 commits March 22, 2024 11:40
- Subproject-Commits in ClickSphere_API und ClickHouseClient geändert
- Aktualisiere Paketreferenzen in ClickSphere_API.csproj:
  - `Microsoft.AspNetCore.OpenApi` auf `9.0.1`
  - `Microsoft.AspNetCore.Authentication.JwtBearer` auf `9.0.1`
  - `System.Configuration.ConfigurationManager` auf `9.0.1`
  - `TimeZoneConverter` auf `7.0.0`
  - `Swashbuckle.AspNetCore.Swagger` auf `7.2.0`
  - `Swashbuckle.AspNetCore.SwaggerGen` auf `7.2.0`
  - `Swashbuckle.AspNetCore.SwaggerUI` auf `7.2.0`
  - `OllamaSharp` auf `5.0.6`
- Aktualisiere `NodaTime` in Octonica.ClickHouseClient.csproj auf `3.2.1`
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