Skip to content

Fix System.Text.Json tests affected by DST#66559

Merged
eiriktsarpalis merged 5 commits into
dotnet:mainfrom
Clockwork-Muse:S_T_Json_DST
Mar 16, 2022
Merged

Fix System.Text.Json tests affected by DST#66559
eiriktsarpalis merged 5 commits into
dotnet:mainfrom
Clockwork-Muse:S_T_Json_DST

Conversation

@Clockwork-Muse

Copy link
Copy Markdown
Contributor

Fixes #66555

Does so by switching all remaining references to DateTime.Now to DateTime.UtcNow.

@ghost ghost added area-System.Text.Json community-contribution Indicates that the PR has been added by a community member labels Mar 13, 2022
@ghost

ghost commented Mar 13, 2022

Copy link
Copy Markdown

Tagging subscribers to this area: @dotnet/area-system-text-json
See info in area-owners.md if you want to be subscribed.

Issue Details

Fixes #66555

Does so by switching all remaining references to DateTime.Now to DateTime.UtcNow.

Author: Clockwork-Muse
Assignees: -
Labels:

area-System.Text.Json

Milestone: -

@stephentoub

Copy link
Copy Markdown
Member

Does so by switching all remaining references to DateTime.Now to DateTime.UtcNow.

Is there still test coverage that local DateTimes are handled correctly?

@Clockwork-Muse

Clockwork-Muse commented Mar 13, 2022

Copy link
Copy Markdown
Contributor Author

Does so by switching all remaining references to DateTime.Now to DateTime.UtcNow.

Is there still test coverage that local DateTimes are handled correctly?

The tests modified are just using them for a parameter, not for local/utc.
There are explicit tests with specific values elsewhere.

@eiriktsarpalis eiriktsarpalis self-assigned this Mar 14, 2022
@eiriktsarpalis

Copy link
Copy Markdown
Member

The latest change seems to have broken the build. Could you take a look?

@Clockwork-Muse

Copy link
Copy Markdown
Contributor Author

@eiriktsarpalis - Sorry, my bad.

@eiriktsarpalis

Copy link
Copy Markdown
Member

Thanks for working on this!

@eiriktsarpalis eiriktsarpalis merged commit f0b7773 into dotnet:main Mar 16, 2022
@Clockwork-Muse Clockwork-Muse deleted the S_T_Json_DST branch March 16, 2022 15:28
radekdoulik pushed a commit to radekdoulik/runtime that referenced this pull request Mar 30, 2022
* Correct whitespace

* Switch DateTime.Now -> DateTime.UtcNow

* Tweak formatting

* Change references to UtcNow to a fixed date/time value.

* Add missing common file reference
@ghost ghost locked as resolved and limited conversation to collaborators Apr 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-System.Text.Json community-contribution Indicates that the PR has been added by a community member

Projects

None yet

Development

Successfully merging this pull request may close these issues.

System.Text.Json tests fail around DST time change

3 participants