Use UtcTime to fix tests
This commit is contained in:
parent
3a0d8c43ca
commit
59262122a8
|
|
@ -340,7 +340,7 @@ namespace Microsoft.AspNetCore.StaticFiles
|
||||||
{
|
{
|
||||||
HttpResponseMessage res2 = await server
|
HttpResponseMessage res2 = await server
|
||||||
.CreateRequest("/SubFolder/extra.xml")
|
.CreateRequest("/SubFolder/extra.xml")
|
||||||
.AddHeader("If-Modified-Since", DateTimeOffset.Now.ToString(format))
|
.AddHeader("If-Modified-Since", DateTimeOffset.UtcNow.ToString(format))
|
||||||
.SendAsync(method.Method);
|
.SendAsync(method.Method);
|
||||||
|
|
||||||
Assert.Equal(HttpStatusCode.NotModified, res2.StatusCode);
|
Assert.Equal(HttpStatusCode.NotModified, res2.StatusCode);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue