{"action":"created","issue":{"url":"https://api.github.com/repos/nightscout/cgm-remote-monitor/issues/208","labels_url":"https://api.github.com/repos/nightscout/cgm-remote-monitor/issues/208/labels{/name}","comments_url":"https://api.github.com/repos/nightscout/cgm-remote-monitor/issues/208/comments","events_url":"https://api.github.com/repos/nightscout/cgm-remote-monitor/issues/208/events","html_url":"https://github.com/nightscout/cgm-remote-monitor/issues/208","id":46906580,"number":208,"title":"Time formats and structure differ between Mongo Collections","user":{"login":"someoneAnyone","id":438049,"avatar_url":"https://avatars.githubusercontent.com/u/438049?v=3","gravatar_id":"","url":"https://api.github.com/users/someoneAnyone","html_url":"https://github.com/someoneAnyone","followers_url":"https://api.github.com/users/someoneAnyone/followers","following_url":"https://api.github.com/users/someoneAnyone/following{/other_user}","gists_url":"https://api.github.com/users/someoneAnyone/gists{/gist_id}","starred_url":"https://api.github.com/users/someoneAnyone/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/someoneAnyone/subscriptions","organizations_url":"https://api.github.com/users/someoneAnyone/orgs","repos_url":"https://api.github.com/users/someoneAnyone/repos","events_url":"https://api.github.com/users/someoneAnyone/events{/privacy}","received_events_url":"https://api.github.com/users/someoneAnyone/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2014-10-27T13:49:30Z","updated_at":"2015-12-06T20:44:31Z","closed_at":null,"body":"Hi, I'm new to the project and just starting to unwrap the data but I noticed that time is recorded in a few different ways. It would be ideal if it was standardized and documented (which format etc...). Hope this helps! I'm a big fan of this project.\r\n\r\nBelow is what I've observed:\r\n\r\nCGM\r\n{\r\n...\r\n    \"date\": 1414370037000,\r\n    \"dateString\": \"10/26/2014 08:33:57 PM\",\r\n...\r\n}\r\ndevicestatus\r\n{\r\n... \r\n \"created_at\": {\r\n       \"$date\": \"2014-10-22T23:44:58.135Z\"\r\n}\r\n...\r\n}\r\ntreatment\r\n{\r\n...\r\n    \"created_at\": \"2014-10-23T01:55:13.636Z\",\r\n...\r\n}\r\n\r\n<bountysource-plugin>\r\n---\r\nWant to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/5550993-time-formats-and-structure-differ-between-mongo-collections?utm_campaign=plugin&utm_content=tracker%2F2451736&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F2451736&utm_medium=issues&utm_source=github).\r\n</bountysource-plugin>"},"comment":{"url":"https://api.github.com/repos/nightscout/cgm-remote-monitor/issues/comments/162346047","html_url":"https://github.com/nightscout/cgm-remote-monitor/issues/208#issuecomment-162346047","issue_url":"https://api.github.com/repos/nightscout/cgm-remote-monitor/issues/208","id":162346047,"user":{"login":"bewest","id":394179,"avatar_url":"https://avatars.githubusercontent.com/u/394179?v=3","gravatar_id":"","url":"https://api.github.com/users/bewest","html_url":"https://github.com/bewest","followers_url":"https://api.github.com/users/bewest/followers","following_url":"https://api.github.com/users/bewest/following{/other_user}","gists_url":"https://api.github.com/users/bewest/gists{/gist_id}","starred_url":"https://api.github.com/users/bewest/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bewest/subscriptions","organizations_url":"https://api.github.com/users/bewest/orgs","repos_url":"https://api.github.com/users/bewest/repos","events_url":"https://api.github.com/users/bewest/events{/privacy}","received_events_url":"https://api.github.com/users/bewest/received_events","type":"User","site_admin":false},"created_at":"2015-12-06T20:44:31Z","updated_at":"2015-12-06T20:44:31Z","body":"It's important to get everything converted to ISO8601.\r\n\r\nWhich uploader produced your cgm record, we should get it patched/updated to latest so they match.\r\nAll mine look like this:\r\n\r\nCGM\r\n```\r\n    \"date\": 1449434107000,\r\n    \"dateString\": \"2015-12-06T20:35:07+00:00\",\r\n\r\n```\r\n\r\nTreatments:\r\n```\r\n    \"created_at\": \"2015-12-06T12:02:25-08:00\",\r\n\r\n```\r\n\r\nNote, with ISO8601, it doesn't matter what the timezone is, so long as it's correctly encoded. :smile_cat: "}}