Skip to content

Use TimeProvider to set HttpContext.Timestamp #408

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 4, 2023
Merged

Conversation

twsouthwick
Copy link
Member

In order to use this, we need to move the timestamp to a feature so we can set this in the middleware where we have TimeProvider. As a benefit of this, we won't prematurely create a System.Web.HttpContext to initialize the time; instead, the feature will be created, but that's it.

Another change this requires is to add a .NET 8 build for the CoreServices library, which raises a few new warnings about some API changes that are addressed in this PR as well.

In order to use this, we need to move the timestamp to a feature so we can set this in the middleware where we have TimeProvider. As a benefit of this, we won't prematurely create a `System.Web.HttpContext` to initialize the time; instead, the feature will be created, but that's it.

Another change this requires is to add a .NET 8 build for the CoreServices library, which raises a few new warnings about some API changes that are addressed in this PR as well.
@twsouthwick twsouthwick requested a review from Tratcher October 4, 2023 00:20
@twsouthwick twsouthwick merged commit 25b5147 into main Oct 4, 2023
@twsouthwick twsouthwick deleted the timestamp branch October 4, 2023 17:19
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.

2 participants