{"action":"created","comment":{"url":"https://api.github.com/repos/Dynamoid/dynamoid/pulls/comments/216143015","pull_request_review_id":153567051,"id":216143015,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxNjE0MzAxNQ==","diff_hunk":"@@ -681,12 +680,12 @@ def reload_address\n \n     it 'uses dumped value of sort key to call UpdateItem' do\n       klass = new_class do\n-        range :activated_at, :datetime\n+        range :activated_on, :date\n         field :name\n       end\n       klass.create_table\n \n-      obj = klass.create!(activated_at: Time.now, name: 'Old value')\n+      obj = klass.create!(activated_on: Date.today, name: 'Old value')","path":"spec/dynamoid/persistence_spec.rb","position":30,"original_position":30,"commit_id":"4251be8ddda307180c662aa4b3507a30b05cc68f","original_commit_id":"4251be8ddda307180c662aa4b3507a30b05cc68f","user":{"login":"pboling","id":19505,"node_id":"MDQ6VXNlcjE5NTA1","avatar_url":"https://avatars1.githubusercontent.com/u/19505?v=4","gravatar_id":"","url":"https://api.github.com/users/pboling","html_url":"https://github.com/pboling","followers_url":"https://api.github.com/users/pboling/followers","following_url":"https://api.github.com/users/pboling/following{/other_user}","gists_url":"https://api.github.com/users/pboling/gists{/gist_id}","starred_url":"https://api.github.com/users/pboling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pboling/subscriptions","organizations_url":"https://api.github.com/users/pboling/orgs","repos_url":"https://api.github.com/users/pboling/repos","events_url":"https://api.github.com/users/pboling/events{/privacy}","received_events_url":"https://api.github.com/users/pboling/received_events","type":"User","site_admin":false},"body":"`Date.today` is dangerous and should generally be avoided as it is not Rails time zone aware.  Especially in specs where we might have people copying the patterns in their own code.  Use `Time.zone.today` instead.\r\n\r\nRef: https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Rails/Date","created_at":"2018-09-08T23:16:14Z","updated_at":"2018-09-08T23:16:52Z","html_url":"https://github.com/Dynamoid/dynamoid/pull/294#discussion_r216143015","pull_request_url":"https://api.github.com/repos/Dynamoid/dynamoid/pulls/294","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Dynamoid/dynamoid/pulls/comments/216143015"},"html":{"href":"https://github.com/Dynamoid/dynamoid/pull/294#discussion_r216143015"},"pull_request":{"href":"https://api.github.com/repos/Dynamoid/dynamoid/pulls/294"}}},"pull_request":{"url":"https://api.github.com/repos/Dynamoid/dynamoid/pulls/294","id":214096849,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE0MDk2ODQ5","html_url":"https://github.com/Dynamoid/dynamoid/pull/294","diff_url":"https://github.com/Dynamoid/dynamoid/pull/294.diff","patch_url":"https://github.com/Dynamoid/dynamoid/pull/294.patch","issue_url":"https://api.github.com/repos/Dynamoid/dynamoid/issues/294","number":294,"state":"open","locked":false,"title":"Fix flaky specs related to numeric datetime format","user":{"login":"andrykonchin","id":732181,"node_id":"MDQ6VXNlcjczMjE4MQ==","avatar_url":"https://avatars3.githubusercontent.com/u/732181?v=4","gravatar_id":"","url":"https://api.github.com/users/andrykonchin","html_url":"https://github.com/andrykonchin","followers_url":"https://api.github.com/users/andrykonchin/followers","following_url":"https://api.github.com/users/andrykonchin/following{/other_user}","gists_url":"https://api.github.com/users/andrykonchin/gists{/gist_id}","starred_url":"https://api.github.com/users/andrykonchin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andrykonchin/subscriptions","organizations_url":"https://api.github.com/users/andrykonchin/orgs","repos_url":"https://api.github.com/users/andrykonchin/repos","events_url":"https://api.github.com/users/andrykonchin/events{/privacy}","received_events_url":"https://api.github.com/users/andrykonchin/received_events","type":"User","site_admin":false},"body":"There is an issue with numeric format of `datetime` fields.\r\n\r\nDynamoid stores `datetime` field as a float number and may lose precision while convert it to needed time zone etc e.g stored value `1536429694.118027` may be loaded as `1536429694.118026999`.\r\n\r\nSo I added warning to not to use `datetime` as a range key, because when precision is lost user cannot load a document with hash key/range key.\r\n\r\nLater we can store `datetime` without float part by default - just seconds - and add config option to preserve current behavior.","created_at":"2018-09-08T14:02:17Z","updated_at":"2018-09-08T23:16:52Z","closed_at":null,"merged_at":null,"merge_commit_sha":"646756a2b48dfebf11060b8c07a1c413955334f6","assignee":null,"assignees":[],"requested_reviewers":[{"login":"richardhsu","id":906880,"node_id":"MDQ6VXNlcjkwNjg4MA==","avatar_url":"https://avatars0.githubusercontent.com/u/906880?v=4","gravatar_id":"","url":"https://api.github.com/users/richardhsu","html_url":"https://github.com/richardhsu","followers_url":"https://api.github.com/users/richardhsu/followers","following_url":"https://api.github.com/users/richardhsu/following{/other_user}","gists_url":"https://api.github.com/users/richardhsu/gists{/gist_id}","starred_url":"https://api.github.com/users/richardhsu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/richardhsu/subscriptions","organizations_url":"https://api.github.com/users/richardhsu/orgs","repos_url":"https://api.github.com/users/richardhsu/repos","events_url":"https://api.github.com/users/richardhsu/events{/privacy}","received_events_url":"https://api.github.com/users/richardhsu/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/Dynamoid/dynamoid/pulls/294/commits","review_comments_url":"https://api.github.com/repos/Dynamoid/dynamoid/pulls/294/comments","review_comment_url":"https://api.github.com/repos/Dynamoid/dynamoid/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Dynamoid/dynamoid/issues/294/comments","statuses_url":"https://api.github.com/repos/Dynamoid/dynamoid/statuses/4251be8ddda307180c662aa4b3507a30b05cc68f","head":{"label":"Dynamoid:fix-flacky-specs","ref":"fix-flacky-specs","sha":"4251be8ddda307180c662aa4b3507a30b05cc68f","user":{"login":"Dynamoid","id":4839245,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ4MzkyNDU=","avatar_url":"https://avatars0.githubusercontent.com/u/4839245?v=4","gravatar_id":"","url":"https://api.github.com/users/Dynamoid","html_url":"https://github.com/Dynamoid","followers_url":"https://api.github.com/users/Dynamoid/followers","following_url":"https://api.github.com/users/Dynamoid/following{/other_user}","gists_url":"https://api.github.com/users/Dynamoid/gists{/gist_id}","starred_url":"https://api.github.com/users/Dynamoid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dynamoid/subscriptions","organizations_url":"https://api.github.com/users/Dynamoid/orgs","repos_url":"https://api.github.com/users/Dynamoid/repos","events_url":"https://api.github.com/users/Dynamoid/events{/privacy}","received_events_url":"https://api.github.com/users/Dynamoid/received_events","type":"Organization","site_admin":false},"repo":{"id":34742968,"node_id":"MDEwOlJlcG9zaXRvcnkzNDc0Mjk2OA==","name":"dynamoid","full_name":"Dynamoid/dynamoid","owner":{"login":"Dynamoid","id":4839245,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ4MzkyNDU=","avatar_url":"https://avatars0.githubusercontent.com/u/4839245?v=4","gravatar_id":"","url":"https://api.github.com/users/Dynamoid","html_url":"https://github.com/Dynamoid","followers_url":"https://api.github.com/users/Dynamoid/followers","following_url":"https://api.github.com/users/Dynamoid/following{/other_user}","gists_url":"https://api.github.com/users/Dynamoid/gists{/gist_id}","starred_url":"https://api.github.com/users/Dynamoid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dynamoid/subscriptions","organizations_url":"https://api.github.com/users/Dynamoid/orgs","repos_url":"https://api.github.com/users/Dynamoid/repos","events_url":"https://api.github.com/users/Dynamoid/events{/privacy}","received_events_url":"https://api.github.com/users/Dynamoid/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Dynamoid/dynamoid","description":"Ruby ORM for Amazon's DynamoDB. ","fork":false,"url":"https://api.github.com/repos/Dynamoid/dynamoid","forks_url":"https://api.github.com/repos/Dynamoid/dynamoid/forks","keys_url":"https://api.github.com/repos/Dynamoid/dynamoid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Dynamoid/dynamoid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Dynamoid/dynamoid/teams","hooks_url":"https://api.github.com/repos/Dynamoid/dynamoid/hooks","issue_events_url":"https://api.github.com/repos/Dynamoid/dynamoid/issues/events{/number}","events_url":"https://api.github.com/repos/Dynamoid/dynamoid/events","assignees_url":"https://api.github.com/repos/Dynamoid/dynamoid/assignees{/user}","branches_url":"https://api.github.com/repos/Dynamoid/dynamoid/branches{/branch}","tags_url":"https://api.github.com/repos/Dynamoid/dynamoid/tags","blobs_url":"https://api.github.com/repos/Dynamoid/dynamoid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Dynamoid/dynamoid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Dynamoid/dynamoid/git/refs{/sha}","trees_url":"https://api.github.com/repos/Dynamoid/dynamoid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Dynamoid/dynamoid/statuses/{sha}","languages_url":"https://api.github.com/repos/Dynamoid/dynamoid/languages","stargazers_url":"https://api.github.com/repos/Dynamoid/dynamoid/stargazers","contributors_url":"https://api.github.com/repos/Dynamoid/dynamoid/contributors","subscribers_url":"https://api.github.com/repos/Dynamoid/dynamoid/subscribers","subscription_url":"https://api.github.com/repos/Dynamoid/dynamoid/subscription","commits_url":"https://api.github.com/repos/Dynamoid/dynamoid/commits{/sha}","git_commits_url":"https://api.github.com/repos/Dynamoid/dynamoid/git/commits{/sha}","comments_url":"https://api.github.com/repos/Dynamoid/dynamoid/comments{/number}","issue_comment_url":"https://api.github.com/repos/Dynamoid/dynamoid/issues/comments{/number}","contents_url":"https://api.github.com/repos/Dynamoid/dynamoid/contents/{+path}","compare_url":"https://api.github.com/repos/Dynamoid/dynamoid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Dynamoid/dynamoid/merges","archive_url":"https://api.github.com/repos/Dynamoid/dynamoid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Dynamoid/dynamoid/downloads","issues_url":"https://api.github.com/repos/Dynamoid/dynamoid/issues{/number}","pulls_url":"https://api.github.com/repos/Dynamoid/dynamoid/pulls{/number}","milestones_url":"https://api.github.com/repos/Dynamoid/dynamoid/milestones{/number}","notifications_url":"https://api.github.com/repos/Dynamoid/dynamoid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Dynamoid/dynamoid/labels{/name}","releases_url":"https://api.github.com/repos/Dynamoid/dynamoid/releases{/id}","deployments_url":"https://api.github.com/repos/Dynamoid/dynamoid/deployments","created_at":"2015-04-28T16:39:36Z","updated_at":"2018-09-04T12:10:40Z","pushed_at":"2018-09-08T23:11:57Z","git_url":"git://github.com/Dynamoid/dynamoid.git","ssh_url":"git@github.com:Dynamoid/dynamoid.git","clone_url":"https://github.com/Dynamoid/dynamoid.git","svn_url":"https://github.com/Dynamoid/dynamoid","homepage":null,"size":26135,"stargazers_count":227,"watchers_count":227,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":122,"mirror_url":null,"archived":false,"open_issues_count":26,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":122,"open_issues":26,"watchers":227,"default_branch":"master"}},"base":{"label":"Dynamoid:master","ref":"master","sha":"e9045c8f17e320a61770d8eef0dd64529e00ffe8","user":{"login":"Dynamoid","id":4839245,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ4MzkyNDU=","avatar_url":"https://avatars0.githubusercontent.com/u/4839245?v=4","gravatar_id":"","url":"https://api.github.com/users/Dynamoid","html_url":"https://github.com/Dynamoid","followers_url":"https://api.github.com/users/Dynamoid/followers","following_url":"https://api.github.com/users/Dynamoid/following{/other_user}","gists_url":"https://api.github.com/users/Dynamoid/gists{/gist_id}","starred_url":"https://api.github.com/users/Dynamoid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dynamoid/subscriptions","organizations_url":"https://api.github.com/users/Dynamoid/orgs","repos_url":"https://api.github.com/users/Dynamoid/repos","events_url":"https://api.github.com/users/Dynamoid/events{/privacy}","received_events_url":"https://api.github.com/users/Dynamoid/received_events","type":"Organization","site_admin":false},"repo":{"id":34742968,"node_id":"MDEwOlJlcG9zaXRvcnkzNDc0Mjk2OA==","name":"dynamoid","full_name":"Dynamoid/dynamoid","owner":{"login":"Dynamoid","id":4839245,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ4MzkyNDU=","avatar_url":"https://avatars0.githubusercontent.com/u/4839245?v=4","gravatar_id":"","url":"https://api.github.com/users/Dynamoid","html_url":"https://github.com/Dynamoid","followers_url":"https://api.github.com/users/Dynamoid/followers","following_url":"https://api.github.com/users/Dynamoid/following{/other_user}","gists_url":"https://api.github.com/users/Dynamoid/gists{/gist_id}","starred_url":"https://api.github.com/users/Dynamoid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dynamoid/subscriptions","organizations_url":"https://api.github.com/users/Dynamoid/orgs","repos_url":"https://api.github.com/users/Dynamoid/repos","events_url":"https://api.github.com/users/Dynamoid/events{/privacy}","received_events_url":"https://api.github.com/users/Dynamoid/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Dynamoid/dynamoid","description":"Ruby ORM for Amazon's DynamoDB. ","fork":false,"url":"https://api.github.com/repos/Dynamoid/dynamoid","forks_url":"https://api.github.com/repos/Dynamoid/dynamoid/forks","keys_url":"https://api.github.com/repos/Dynamoid/dynamoid/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Dynamoid/dynamoid/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Dynamoid/dynamoid/teams","hooks_url":"https://api.github.com/repos/Dynamoid/dynamoid/hooks","issue_events_url":"https://api.github.com/repos/Dynamoid/dynamoid/issues/events{/number}","events_url":"https://api.github.com/repos/Dynamoid/dynamoid/events","assignees_url":"https://api.github.com/repos/Dynamoid/dynamoid/assignees{/user}","branches_url":"https://api.github.com/repos/Dynamoid/dynamoid/branches{/branch}","tags_url":"https://api.github.com/repos/Dynamoid/dynamoid/tags","blobs_url":"https://api.github.com/repos/Dynamoid/dynamoid/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Dynamoid/dynamoid/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Dynamoid/dynamoid/git/refs{/sha}","trees_url":"https://api.github.com/repos/Dynamoid/dynamoid/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Dynamoid/dynamoid/statuses/{sha}","languages_url":"https://api.github.com/repos/Dynamoid/dynamoid/languages","stargazers_url":"https://api.github.com/repos/Dynamoid/dynamoid/stargazers","contributors_url":"https://api.github.com/repos/Dynamoid/dynamoid/contributors","subscribers_url":"https://api.github.com/repos/Dynamoid/dynamoid/subscribers","subscription_url":"https://api.github.com/repos/Dynamoid/dynamoid/subscription","commits_url":"https://api.github.com/repos/Dynamoid/dynamoid/commits{/sha}","git_commits_url":"https://api.github.com/repos/Dynamoid/dynamoid/git/commits{/sha}","comments_url":"https://api.github.com/repos/Dynamoid/dynamoid/comments{/number}","issue_comment_url":"https://api.github.com/repos/Dynamoid/dynamoid/issues/comments{/number}","contents_url":"https://api.github.com/repos/Dynamoid/dynamoid/contents/{+path}","compare_url":"https://api.github.com/repos/Dynamoid/dynamoid/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Dynamoid/dynamoid/merges","archive_url":"https://api.github.com/repos/Dynamoid/dynamoid/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Dynamoid/dynamoid/downloads","issues_url":"https://api.github.com/repos/Dynamoid/dynamoid/issues{/number}","pulls_url":"https://api.github.com/repos/Dynamoid/dynamoid/pulls{/number}","milestones_url":"https://api.github.com/repos/Dynamoid/dynamoid/milestones{/number}","notifications_url":"https://api.github.com/repos/Dynamoid/dynamoid/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Dynamoid/dynamoid/labels{/name}","releases_url":"https://api.github.com/repos/Dynamoid/dynamoid/releases{/id}","deployments_url":"https://api.github.com/repos/Dynamoid/dynamoid/deployments","created_at":"2015-04-28T16:39:36Z","updated_at":"2018-09-04T12:10:40Z","pushed_at":"2018-09-08T23:11:57Z","git_url":"git://github.com/Dynamoid/dynamoid.git","ssh_url":"git@github.com:Dynamoid/dynamoid.git","clone_url":"https://github.com/Dynamoid/dynamoid.git","svn_url":"https://github.com/Dynamoid/dynamoid","homepage":null,"size":26135,"stargazers_count":227,"watchers_count":227,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":122,"mirror_url":null,"archived":false,"open_issues_count":26,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":122,"open_issues":26,"watchers":227,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Dynamoid/dynamoid/pulls/294"},"html":{"href":"https://github.com/Dynamoid/dynamoid/pull/294"},"issue":{"href":"https://api.github.com/repos/Dynamoid/dynamoid/issues/294"},"comments":{"href":"https://api.github.com/repos/Dynamoid/dynamoid/issues/294/comments"},"review_comments":{"href":"https://api.github.com/repos/Dynamoid/dynamoid/pulls/294/comments"},"review_comment":{"href":"https://api.github.com/repos/Dynamoid/dynamoid/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Dynamoid/dynamoid/pulls/294/commits"},"statuses":{"href":"https://api.github.com/repos/Dynamoid/dynamoid/statuses/4251be8ddda307180c662aa4b3507a30b05cc68f"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"pboling"}}