{"action":"reopened","issue":{"url":"https://api.github.com/repos/realm/realm-cocoa/issues/2152","labels_url":"https://api.github.com/repos/realm/realm-cocoa/issues/2152/labels{/name}","comments_url":"https://api.github.com/repos/realm/realm-cocoa/issues/2152/comments","events_url":"https://api.github.com/repos/realm/realm-cocoa/issues/2152/events","html_url":"https://github.com/realm/realm-cocoa/issues/2152","id":92684215,"number":2152,"title":"NSDates in the far future are not stored correctly","user":{"login":"camh","id":58625,"avatar_url":"https://avatars.githubusercontent.com/u/58625?v=3","gravatar_id":"","url":"https://api.github.com/users/camh","html_url":"https://github.com/camh","followers_url":"https://api.github.com/users/camh/followers","following_url":"https://api.github.com/users/camh/following{/other_user}","gists_url":"https://api.github.com/users/camh/gists{/gist_id}","starred_url":"https://api.github.com/users/camh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camh/subscriptions","organizations_url":"https://api.github.com/users/camh/orgs","repos_url":"https://api.github.com/users/camh/repos","events_url":"https://api.github.com/users/camh/events{/privacy}","received_events_url":"https://api.github.com/users/camh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"segiddins","id":1946610,"avatar_url":"https://avatars.githubusercontent.com/u/1946610?v=3","gravatar_id":"","url":"https://api.github.com/users/segiddins","html_url":"https://github.com/segiddins","followers_url":"https://api.github.com/users/segiddins/followers","following_url":"https://api.github.com/users/segiddins/following{/other_user}","gists_url":"https://api.github.com/users/segiddins/gists{/gist_id}","starred_url":"https://api.github.com/users/segiddins/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/segiddins/subscriptions","organizations_url":"https://api.github.com/users/segiddins/orgs","repos_url":"https://api.github.com/users/segiddins/repos","events_url":"https://api.github.com/users/segiddins/events{/privacy}","received_events_url":"https://api.github.com/users/segiddins/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2015-07-02T16:54:45Z","updated_at":"2015-07-06T18:22:46Z","closed_at":null,"body":"(Using Realm 0.93.2)\r\n\r\nI'm trying to store an expiration date on a subclass of `RLMObject`. So the default `expiresAt` property (*cough* since `nil` in unsupported *cough*) must be a date in the far future. I saw `[NSDate distantFuture]` is not supported in the documentation. So using [DateTools](https://github.com/MatthewYork/DateTools/tree/master/DateTools), I made the default value 500 years in the future.\r\n\r\n```\r\n+ (NSDictionary *)defaultPropertyValues{\r\n\treturn @{\r\n\t\t\t @\"expiresAt\" : [[NSDate date] dateByAddingYears:500]\r\n\t\t\t };\r\n}\r\n```\r\n\r\nBut after it has been committed to the Realm:\r\n\r\n```\r\nexpiresAt = 1901-12-13 20:45:52 +0000;\r\n```\r\n\r\nHuh. Well, that's fine, maybe 100 years in the future?\r\n\r\n```\r\nexpiresAt = 1901-12-13 20:45:52 +0000;\r\n```\r\n\r\nSo how many years in the future is supported? 25 doesn't work. 20 does. This is a huge limitation. I knew about no second precision, but this is not documented at all. Are there other limitations in your implementation of storing dates that are not documented? Why don't you store lossless dates?"}}