Skip to content

Conversation

phenning
Copy link
Member

@phenning phenning commented Aug 5, 2024

Fixes WebTools AZDo issue 2187534

@phenning
Copy link
Member Author

phenning commented Aug 5, 2024

@jonsequitur
Copy link
Contributor

Can you provide a test to pin the expected behavior?

@phenning
Copy link
Member Author

phenning commented Aug 5, 2024

Sure it looks like we already have some that were added in a previous PR, but didn’t use the full time likely due to not being able to get an accurate asset time, so we were hiding this bug.

I’ll update the test to at least consider the hour in the format string that should reduce the likelihood of random failures as opposed to using a full datetime.

https://github.com/dotnet/interactive/pull/3505/files

@phenning
Copy link
Member Author

phenning commented Aug 6, 2024

Can you provide a test to pin the expected behavior?

Added two new tests which just verify that we are using the correct timezone, added comment in tests to explain slightly different usage then other unit tests - in other tests we pass in a delegate which replaces the default product behavior so that we can match the actual time in the assertions. For this test, we don't call that overload so that we get the actual product behavior and the real GetDateTimeOffset method is called which returns either Now or UtcNow depending on the isLocal argument.

@jonsequitur jonsequitur enabled auto-merge (squash) August 6, 2024 17:19
@jonsequitur jonsequitur merged commit a86ea33 into dotnet:main Aug 6, 2024
4 checks passed
@jonsequitur jonsequitur added the Area-HTTP HttpKernel, Visual Studio HTTP Editor label Oct 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-HTTP HttpKernel, Visual Studio HTTP Editor
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants