Skip to content
This repository was archived by the owner on Nov 22, 2018. It is now read-only.

Commit 5926212

Browse files
committed
Use UtcTime to fix tests
1 parent 3a0d8c4 commit 5926212

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

test/Microsoft.AspNetCore.StaticFiles.Tests/CacheHeaderTests.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ public async Task SuppportsIfModifiedDateFormats(HttpMethod method)
340340
{
341341
HttpResponseMessage res2 = await server
342342
.CreateRequest("/SubFolder/extra.xml")
343-
.AddHeader("If-Modified-Since", DateTimeOffset.Now.ToString(format))
343+
.AddHeader("If-Modified-Since", DateTimeOffset.UtcNow.ToString(format))
344344
.SendAsync(method.Method);
345345

346346
Assert.Equal(HttpStatusCode.NotModified, res2.StatusCode);

0 commit comments

Comments
 (0)