Skip to content
This repository has been archived by the owner on Jul 7, 2019. It is now read-only.

Fix if it is set to absolute time, unable to store the problem. #172

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Enyim.Caching/MemcachedClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -958,7 +958,7 @@ protected static uint GetExpiration(DateTime expiresAt)
// accept MaxValue as infinite
if (expiresAt == DateTime.MaxValue) return 0;

uint retval = (uint)(expiresAt.ToUniversalTime() - UnixEpoch).TotalSeconds;
uint retval = (uint)(expiresAt.ToUniversalTime() - DateTime.Now.ToUniversalTime()).TotalSeconds;

return retval;
}
Expand Down Expand Up @@ -1005,7 +1005,7 @@ public void Dispose()
#region [ License information ]
/* ************************************************************
*
* Copyright (c) 2010 Attila Kisk�, enyim.com
* Copyright (c) 2010 Attila Kiskó, enyim.com
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down