[PR #284] RadzenDatePicker binds DateTime with Kind == Unspecified #2103

Open
opened 2026-01-29 18:17:14 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/radzenhq/radzen-blazor/pull/284

State: closed
Merged: Yes


Hi,

Npgsql releases version 6.0 with significant breaking changes releated to timestamp and DateTime:
https://www.npgsql.org/doc/release-notes/6.0.html#timestamp-rationalization-and-improvements

Now, if someone save DateTime with Kind that set to Unspecified or Local Npgsql will throw exception:
"Error An error occurred while saving the entity changes. See the inner exception for details.
InnerException: Cannot write DateTime with Kind=Unspecified to PostgreSQL type 'timestamp with time zone', only UTC is supported.
Note that it's not possible to mix DateTimes with different Kinds in an array/range.
See the Npgsql.EnableLegacyTimestampBehavior AppContext switch to enable legacy behavior."

RadzenDatePicker internally creates many DateTime structs with default kind (Unspecified) and without any possibility to control that.

**Original Pull Request:** https://github.com/radzenhq/radzen-blazor/pull/284 **State:** closed **Merged:** Yes --- Hi, Npgsql releases version 6.0 with significant breaking changes releated to timestamp and DateTime: https://www.npgsql.org/doc/release-notes/6.0.html#timestamp-rationalization-and-improvements Now, if someone save DateTime with Kind that set to Unspecified or Local Npgsql will throw exception: "Error An error occurred while saving the entity changes. See the inner exception for details. InnerException: Cannot write DateTime with Kind=Unspecified to PostgreSQL type 'timestamp with time zone', only UTC is supported. Note that it's not possible to mix DateTimes with different Kinds in an array/range. See the Npgsql.EnableLegacyTimestampBehavior AppContext switch to enable legacy behavior." RadzenDatePicker internally creates many DateTime structs with default kind (Unspecified) and without any possibility to control that.
claunia added the pull-request label 2026-01-29 18:17:14 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/radzen-blazor#2103