Skip to content

Commit 40029f4

Browse files
eypcnckrEyupcan Cakir
and
Eyupcan Cakir
authored
Fix expiry date comparison to use DateTime.UtcNow for correct UTC time zone handling (#24)
Co-authored-by: Eyupcan Cakir <[email protected]>
1 parent 7f7a795 commit 40029f4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/OutputCacheModuleAsync/OutputCacheHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1060,7 +1060,7 @@ private bool IsIdentityAcceptable(string acceptEncoding) {
10601060
}
10611061

10621062
private async Task InsertResponseAsync(string key, DateTime utcExpires, CachedVary cachedVary, HttpCachePolicySettings settings, string keyRawResponse, TimeSpan slidingDelta) {
1063-
if (utcExpires > DateTime.Now) {
1063+
if (utcExpires > DateTime.UtcNow) {
10641064
// Create the response object to be sent on cache hits.
10651065
var httpRawResponse = GetSnapshot();
10661066
string kernelCacheUrl = null;

0 commit comments

Comments
 (0)