Skip to content

Locale mismatch causes inconsistent date handling between .NET and PostgreSQL #70

@kudima03

Description

@kudima03

PostgreSQL sometimes initializes with a non-invariant locale (e.g. en_US.UTF-8, ru_RU.UTF-8).
As a result, date strings are parsed and formatted differently than in .NET using InvariantCulture, causing inconsistent results when inserting or reading dates.

Example
'01.02.2024'::timestamp → interpreted as Feb 1 or Jan 2 depending on locale.

Expected
Date behavior should be culture-invariant and consistent across environments.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions