Skip to content

JsonSerializer - Ensure invariant formatting of DateTimeOffset - #4142

Merged
304NotModified merged 1 commit into
NLog:masterfrom
snakefoot:JsonDateTimeOffsetInvariant
Oct 30, 2020
Merged

304NotModified merged 1 commit into
NLog:masterfrom
snakefoot:JsonDateTimeOffsetInvariant

Conversation

@snakefoot

@snakefoot snakefoot commented Oct 22, 2020 •

Copy link
Copy Markdown
Contributor

Really strange but VS2019 16.8 Preview then this:

QuoteValue(destination, $"{value:yyyy-MM-dd HH:mm:ss zzz}");`

Fails in formatting:

   Expected: "2016-12-31 02:30:59 +04:30"
    Actual:   "2016-12-31 02.30.59 +04:30"

By forcing CultureInfo.InvariantCulture then it works as expected.

@snakefoot snakefoot added bug Bug report / Bug fix json / json-layout labels Oct 22, 2020
@snakefoot snakefoot added this to the 4.7.6 milestone Oct 22, 2020
@snakefoot
snakefoot force-pushed the JsonDateTimeOffsetInvariant branch from cd70e7c to e159c30 Compare October 25, 2020 21:29
@snakefoot
snakefoot changed the base branch from dev to master October 26, 2020 00:10
@sonarqubecloud

Copy link
Copy Markdown

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@304NotModified
304NotModified merged commit 19de9e7 into NLog:master Oct 30, 2020
@304NotModified

Copy link
Copy Markdown
Member

nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants