{"action":"created","issue":{"url":"https://api.github.com/repos/flutter/flutter/issues/18159","repository_url":"https://api.github.com/repos/flutter/flutter","labels_url":"https://api.github.com/repos/flutter/flutter/issues/18159/labels{/name}","comments_url":"https://api.github.com/repos/flutter/flutter/issues/18159/comments","events_url":"https://api.github.com/repos/flutter/flutter/issues/18159/events","html_url":"https://github.com/flutter/flutter/issues/18159","id":328994595,"node_id":"MDU6SXNzdWUzMjg5OTQ1OTU=","number":18159,"title":"5.0.0 - [Firebase/Firestore][I-FST000001]  Firebase Timestamp objects instead of as system Date objects","user":{"login":"LiveRock","id":211891,"node_id":"MDQ6VXNlcjIxMTg5MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/211891?v=4","gravatar_id":"","url":"https://api.github.com/users/LiveRock","html_url":"https://github.com/LiveRock","followers_url":"https://api.github.com/users/LiveRock/followers","following_url":"https://api.github.com/users/LiveRock/following{/other_user}","gists_url":"https://api.github.com/users/LiveRock/gists{/gist_id}","starred_url":"https://api.github.com/users/LiveRock/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LiveRock/subscriptions","organizations_url":"https://api.github.com/users/LiveRock/orgs","repos_url":"https://api.github.com/users/LiveRock/repos","events_url":"https://api.github.com/users/LiveRock/events{/privacy}","received_events_url":"https://api.github.com/users/LiveRock/received_events","type":"User","site_admin":false},"labels":[{"id":379784845,"node_id":"MDU6TGFiZWwzNzk3ODQ4NDU=","url":"https://api.github.com/repos/flutter/flutter/labels/p:%20firebase","name":"p: firebase","color":"fbca04","default":false},{"id":527275775,"node_id":"MDU6TGFiZWw1MjcyNzU3NzU=","url":"https://api.github.com/repos/flutter/flutter/labels/p:%20first%20party","name":"p: first party","color":"fbca04","default":false},{"id":284439562,"node_id":"MDU6TGFiZWwyODQ0Mzk1NjI=","url":"https://api.github.com/repos/flutter/flutter/labels/plugin","name":"plugin","color":"fbca04","default":false},{"id":289627367,"node_id":"MDU6TGFiZWwyODk2MjczNjc=","url":"https://api.github.com/repos/flutter/flutter/labels/waiting%20for%20PR%20to%20land%20(fixed)","name":"waiting for PR to land (fixed)","color":"000000","default":false},{"id":283479900,"node_id":"MDU6TGFiZWwyODM0Nzk5MDA=","url":"https://api.github.com/repos/flutter/flutter/labels/%E2%96%A3%20platform-android","name":"▣ platform-android","color":"003570","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/flutter/flutter/milestones/22","html_url":"https://github.com/flutter/flutter/milestone/22","labels_url":"https://api.github.com/repos/flutter/flutter/milestones/22/labels","id":2270094,"node_id":"MDk6TWlsZXN0b25lMjI3MDA5NA==","number":22,"title":"Goals","description":"P2: These are tasks we think are worth fixing in the coming years. It includes issues we've identified that might block fully shipping broad consumer-facing apps, correctness issues, and bugs relating to polish and quality.\r\n\r\nThe date on this milestone is utterly arbitrary and just intended to sort the milestone appropriately.","creator":{"login":"Hixie","id":551196,"node_id":"MDQ6VXNlcjU1MTE5Ng==","avatar_url":"https://avatars2.githubusercontent.com/u/551196?v=4","gravatar_id":"","url":"https://api.github.com/users/Hixie","html_url":"https://github.com/Hixie","followers_url":"https://api.github.com/users/Hixie/followers","following_url":"https://api.github.com/users/Hixie/following{/other_user}","gists_url":"https://api.github.com/users/Hixie/gists{/gist_id}","starred_url":"https://api.github.com/users/Hixie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Hixie/subscriptions","organizations_url":"https://api.github.com/users/Hixie/orgs","repos_url":"https://api.github.com/users/Hixie/repos","events_url":"https://api.github.com/users/Hixie/events{/privacy}","received_events_url":"https://api.github.com/users/Hixie/received_events","type":"User","site_admin":false},"open_issues":1382,"closed_issues":581,"state":"open","created_at":"2017-01-23T00:27:59Z","updated_at":"2018-10-27T16:11:03Z","due_on":"2031-01-01T08:00:00Z","closed_at":null},"comments":27,"created_at":"2018-06-04T10:19:03Z","updated_at":"2018-10-27T18:57:56Z","closed_at":"2018-10-18T21:51:14Z","author_association":"NONE","body":"Here is the error/warning. The solution give is for ioS Swift but I am writing in Flutter/Dart.\r\n```\r\n5.0.0 - [Firebase/Firestore][I-FST000001] The behavior for system Date objects stored in Firestore is going to change AND YOUR APP MAY BREAK.\r\nTo hide this warning and ensure your app does not break, you need to add the following code to your app before calling any other Cloud Firestore methods:\r\nlet db = Firestore.firestore()\r\nlet settings = db.settings\r\n\r\nWith this change, timestamps stored in Cloud Firestore will be read back as Firebase Timestamp objects instead of as system Date objects. So you will also need to update code expecting a Date to instead expect a Timestamp. For example:\r\n// old:\r\nlet date: Date = documentSnapshot.get(\"created_at\") as! Date\r\n// new:\r\nlet timestamp: Timestamp = documentSnapshot.get(\"created_at\") as! Timestamp\r\nlet date: Date = timestamp.dateValue()\r\nPlease audit all existing usages of Date when you enable the new behavior. In a future release, the behavior will be changed to the new behavior, so if you do<…>\r\n```\r\nI can't find settings in the below:\r\nfinal Firestore db = Firestore.instance;\r\n  // var settings = db.app.settings ?\r\n\r\nplease help\r\n"},"comment":{"url":"https://api.github.com/repos/flutter/flutter/issues/comments/433646379","html_url":"https://github.com/flutter/flutter/issues/18159#issuecomment-433646379","issue_url":"https://api.github.com/repos/flutter/flutter/issues/18159","id":433646379,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMzY0NjM3OQ==","user":{"login":"satish754ss","id":36834824,"node_id":"MDQ6VXNlcjM2ODM0ODI0","avatar_url":"https://avatars0.githubusercontent.com/u/36834824?v=4","gravatar_id":"","url":"https://api.github.com/users/satish754ss","html_url":"https://github.com/satish754ss","followers_url":"https://api.github.com/users/satish754ss/followers","following_url":"https://api.github.com/users/satish754ss/following{/other_user}","gists_url":"https://api.github.com/users/satish754ss/gists{/gist_id}","starred_url":"https://api.github.com/users/satish754ss/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/satish754ss/subscriptions","organizations_url":"https://api.github.com/users/satish754ss/orgs","repos_url":"https://api.github.com/users/satish754ss/repos","events_url":"https://api.github.com/users/satish754ss/events{/privacy}","received_events_url":"https://api.github.com/users/satish754ss/received_events","type":"User","site_admin":false},"created_at":"2018-10-27T18:57:56Z","updated_at":"2018-10-27T18:57:56Z","author_association":"NONE","body":"![screenshot 47](https://user-images.githubusercontent.com/36834824/47608251-4c747080-da48-11e8-8e00-91e061e3e56d.png)\r\n"}}
{"actor":{"display_login":"satish754ss"}}