Skip to content

Commit 974247b

Browse files
authored
Don't use local time to avoid problems entering winter time (#204)
1 parent a5cb7a7 commit 974247b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Spring/Spring.Web/Caching/AspNetCache.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ public void Insert(object key, object value, TimeSpan timeToLive, bool slidingEx
287287
}
288288
else
289289
{
290-
DateTime absoluteExpiration = DateTime.Now.Add(timeToLive);
290+
DateTime absoluteExpiration = DateTime.UtcNow.Add(timeToLive);
291291
_cache.Insert(GenerateKey(key), value, null, absoluteExpiration, Cache.NoSlidingExpiration, itemPriority, null);
292292
}
293293
}

0 commit comments

Comments
 (0)