Documents Expiration

.net
server

#1

Hello there,
I’m having a problem with ttl of the documents.
I’m using .net sdk and i’m using this function to calculate the unix timestamp.

public static long ToEpochTime(this DateTime dateTime)
{
var date = dateTime.ToUniversalTime();
var ticks = date.Ticks - new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc).Ticks;
var ts = ticks / TimeSpan.TicksPerSecond;
return ts;
}

Then i insert the document.

bucket.Upsert(new Document<OB.Events.Contracts.Data.PortalNotificationEvent>
{
Id = “Teste2”,
Content = document
Expiry = 1476438220 (14 Oct 2016 09:43:40)
});

When i go to couchbase and see the expiration i get the value:
{
“id”: “Teste2”,
“rev”: “7-1473d9419f08000057ee53d002000001”,
“expiration”: 1475236816, (30 Sep 2016 12:00:16)
“flags”: 33554433
}

Am i setting the value in the wrong way?
Could this be a server problem?
I check the configurations of the cluster and UTC=yes, the time and date are ok.

What am i missing?
Thanks