Skip to content

Issue: DateTime is reformatted incorrectly due to system locale #22

@swagfin

Description

@swagfin

Description
When formatting DateTime values, the output is incorrect on machines
using certain regional settings.
For example, a date like 2025-12-08 is displayed as 12-Aug-2025
because the formatter depends on the system's current culture.

Expected Behavior
Dates should be formatted consistently regardless of the machine's
locale.

Recommendation
Use CultureInfo.InvariantCulture (or allow specifying a culture
explicitly) when calling .ToString() or when parsing DateTime values
to avoid locale-dependent reformatting.

Example Fix

date.ToString("dd-MMM-yyyy HH:mm:ss", CultureInfo.InvariantCulture);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions