kalmas
kalmas

Reputation: 880

RavenDB Document Deleted Before Expiration

I am attempting to write a document to RavenDB with an expiration 20 minutes in the future. I am not using the .NET client, just curl. My request looks like this:

PUT /databases/FRUPublic/docs/test/123 HTTP/1.1
Host: ravendev
Connection: close
Accept-encoding: gzip, deflate
Content-Type: application/json
Raven-Entity-Name: tests
Raven-Expiration-Date: 2012-07-31T22:23:00
Content-Length: 14

{"data":"foo"}

In the studio I see my document saved with Raven-Expiration-Date set exactly 20 minutes from Last-Modified, however, within 5 minutes the document is deleted. I see this same behavior (deleted in 5 minutes) if I increase the expiration date. If I set an expiration date in the past the document deletes immediately.

I am using build 960. Any ideas about what I'm doing wrong?

Upvotes: 3

Views: 340

Answers (2)

kalmas
kalmas

Reputation: 880

I specified the time to 10 millionth of a second and now documents are being deleted just as I would expect. For example:

Raven-Expiration-Date: 2012-07-31T22:23:00.0000000

Upvotes: 2

Ayende Rahien
Ayende Rahien

Reputation: 22956

The date have to be in UTC, and it looks like you are sending local time.

Upvotes: 0

Related Questions