Skip to content

VSIX: fix signature timestamp format string bug#839

Merged
dtivel merged 1 commit intomainfrom
dtivel/invariant-culture
Mar 31, 2025
Merged

VSIX: fix signature timestamp format string bug#839
dtivel merged 1 commit intomainfrom
dtivel/invariant-culture

Conversation

@dtivel
Copy link
Collaborator

@dtivel dtivel commented Mar 28, 2025

Resolve #837.

By default, DateTimeOffset.ToString(string) uses the current culture. For en-DK, the time separator is . not :. So, the result is a value which doesn't follow the OPC signature timestamp format.

This change forces the DateTimeOffset.ToString(...) call to use CultureInfo.InvariantCulture. This produces the expected result regardless of the current culture.

Copy link

@ErikEJ ErikEJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

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.

Wrong timestamp with English (Denmark) regional settings when signing a .VSIX

4 participants