Don't use local time to avoid problems entering winter time (#204)

This commit is contained in:
jjvdgeer
2021-04-15 15:00:36 +02:00
committed by GitHub
parent a5cb7a7973
commit 974247bd0f

View File

@@ -287,7 +287,7 @@ namespace Spring.Caching
}
else
{
DateTime absoluteExpiration = DateTime.Now.Add(timeToLive);
DateTime absoluteExpiration = DateTime.UtcNow.Add(timeToLive);
_cache.Insert(GenerateKey(key), value, null, absoluteExpiration, Cache.NoSlidingExpiration, itemPriority, null);
}
}