{"action":"closed","number":51,"pull_request":{"url":"https://api.github.com/repos/devmynd/hstore_accessor/pulls/51","id":27110264,"html_url":"https://github.com/devmynd/hstore_accessor/pull/51","diff_url":"https://github.com/devmynd/hstore_accessor/pull/51.diff","patch_url":"https://github.com/devmynd/hstore_accessor/pull/51.patch","issue_url":"https://api.github.com/repos/devmynd/hstore_accessor/issues/51","number":51,"state":"closed","locked":false,"title":"deserialze time with zone to provide consistent accessor interface","user":{"login":"eprothro","id":798287,"avatar_url":"https://avatars.githubusercontent.com/u/798287?v=3","gravatar_id":"","url":"https://api.github.com/users/eprothro","html_url":"https://github.com/eprothro","followers_url":"https://api.github.com/users/eprothro/followers","following_url":"https://api.github.com/users/eprothro/following{/other_user}","gists_url":"https://api.github.com/users/eprothro/gists{/gist_id}","starred_url":"https://api.github.com/users/eprothro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eprothro/subscriptions","organizations_url":"https://api.github.com/users/eprothro/orgs","repos_url":"https://api.github.com/users/eprothro/repos","events_url":"https://api.github.com/users/eprothro/events{/privacy}","received_events_url":"https://api.github.com/users/eprothro/received_events","type":"User","site_admin":false},"body":"My understanding is that an Active Record date_time accessors are [time zone aware](http://api.rubyonrails.org/classes/ActiveRecord/Timestamp.html), returning the object configured with the current time zone (e.g. not the system time). If I'm wrong there, just let me know.\r\n\r\nMigrating to this gem with existing data (e.g replacing field `foo_at` that was an Active Record date_time type field with an hstore_accessor attribute with `data_type: :time` resulted in unexpected behavior, where the returned object is now initialized with the zone of the system clock.\r\n\r\n#### Before migration to hstore\r\n```\r\nsome_model.foo_at.iso8601\r\n=> 2015-05-11T21:28:00Z\r\n```\r\n\r\n#### After migration to hstore\r\n```\r\nsome_model.foo_at.iso8601\r\n=> 2015-05-11T16:28:00-05:00\r\n```\r\n\r\nThe change in this PR fixes this, such that the ActiveSupport timezone is respected. \r\n\r\nIf you think this is the right direction, I'd love your thoughts about the robustness of this change, and how to best integrate that with the test suite. ","created_at":"2015-01-09T16:18:58Z","updated_at":"2015-01-22T19:12:50Z","closed_at":"2015-01-22T19:12:50Z","merged_at":null,"merge_commit_sha":"538e5e88d486e9f14377b0d0ad28970772b078e4","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/devmynd/hstore_accessor/pulls/51/commits","review_comments_url":"https://api.github.com/repos/devmynd/hstore_accessor/pulls/51/comments","review_comment_url":"https://api.github.com/repos/devmynd/hstore_accessor/pulls/comments/{number}","comments_url":"https://api.github.com/repos/devmynd/hstore_accessor/issues/51/comments","statuses_url":"https://api.github.com/repos/devmynd/hstore_accessor/statuses/d27a643cd39596f8688a9d86b2feab118b6a2b8c","head":{"label":"rocketmobile:master","ref":"master","sha":"d27a643cd39596f8688a9d86b2feab118b6a2b8c","user":{"login":"rocketmobile","id":1554364,"avatar_url":"https://avatars.githubusercontent.com/u/1554364?v=3","gravatar_id":"","url":"https://api.github.com/users/rocketmobile","html_url":"https://github.com/rocketmobile","followers_url":"https://api.github.com/users/rocketmobile/followers","following_url":"https://api.github.com/users/rocketmobile/following{/other_user}","gists_url":"https://api.github.com/users/rocketmobile/gists{/gist_id}","starred_url":"https://api.github.com/users/rocketmobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rocketmobile/subscriptions","organizations_url":"https://api.github.com/users/rocketmobile/orgs","repos_url":"https://api.github.com/users/rocketmobile/repos","events_url":"https://api.github.com/users/rocketmobile/events{/privacy}","received_events_url":"https://api.github.com/users/rocketmobile/received_events","type":"Organization","site_admin":false},"repo":{"id":29022270,"name":"hstore_accessor","full_name":"rocketmobile/hstore_accessor","owner":{"login":"rocketmobile","id":1554364,"avatar_url":"https://avatars.githubusercontent.com/u/1554364?v=3","gravatar_id":"","url":"https://api.github.com/users/rocketmobile","html_url":"https://github.com/rocketmobile","followers_url":"https://api.github.com/users/rocketmobile/followers","following_url":"https://api.github.com/users/rocketmobile/following{/other_user}","gists_url":"https://api.github.com/users/rocketmobile/gists{/gist_id}","starred_url":"https://api.github.com/users/rocketmobile/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rocketmobile/subscriptions","organizations_url":"https://api.github.com/users/rocketmobile/orgs","repos_url":"https://api.github.com/users/rocketmobile/repos","events_url":"https://api.github.com/users/rocketmobile/events{/privacy}","received_events_url":"https://api.github.com/users/rocketmobile/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rocketmobile/hstore_accessor","description":"Adds typed hstore-backed field support to ActiveRecord models.","fork":true,"url":"https://api.github.com/repos/rocketmobile/hstore_accessor","forks_url":"https://api.github.com/repos/rocketmobile/hstore_accessor/forks","keys_url":"https://api.github.com/repos/rocketmobile/hstore_accessor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rocketmobile/hstore_accessor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rocketmobile/hstore_accessor/teams","hooks_url":"https://api.github.com/repos/rocketmobile/hstore_accessor/hooks","issue_events_url":"https://api.github.com/repos/rocketmobile/hstore_accessor/issues/events{/number}","events_url":"https://api.github.com/repos/rocketmobile/hstore_accessor/events","assignees_url":"https://api.github.com/repos/rocketmobile/hstore_accessor/assignees{/user}","branches_url":"https://api.github.com/repos/rocketmobile/hstore_accessor/branches{/branch}","tags_url":"https://api.github.com/repos/rocketmobile/hstore_accessor/tags","blobs_url":"https://api.github.com/repos/rocketmobile/hstore_accessor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rocketmobile/hstore_accessor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rocketmobile/hstore_accessor/git/refs{/sha}","trees_url":"https://api.github.com/repos/rocketmobile/hstore_accessor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rocketmobile/hstore_accessor/statuses/{sha}","languages_url":"https://api.github.com/repos/rocketmobile/hstore_accessor/languages","stargazers_url":"https://api.github.com/repos/rocketmobile/hstore_accessor/stargazers","contributors_url":"https://api.github.com/repos/rocketmobile/hstore_accessor/contributors","subscribers_url":"https://api.github.com/repos/rocketmobile/hstore_accessor/subscribers","subscription_url":"https://api.github.com/repos/rocketmobile/hstore_accessor/subscription","commits_url":"https://api.github.com/repos/rocketmobile/hstore_accessor/commits{/sha}","git_commits_url":"https://api.github.com/repos/rocketmobile/hstore_accessor/git/commits{/sha}","comments_url":"https://api.github.com/repos/rocketmobile/hstore_accessor/comments{/number}","issue_comment_url":"https://api.github.com/repos/rocketmobile/hstore_accessor/issues/comments/{number}","contents_url":"https://api.github.com/repos/rocketmobile/hstore_accessor/contents/{+path}","compare_url":"https://api.github.com/repos/rocketmobile/hstore_accessor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rocketmobile/hstore_accessor/merges","archive_url":"https://api.github.com/repos/rocketmobile/hstore_accessor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rocketmobile/hstore_accessor/downloads","issues_url":"https://api.github.com/repos/rocketmobile/hstore_accessor/issues{/number}","pulls_url":"https://api.github.com/repos/rocketmobile/hstore_accessor/pulls{/number}","milestones_url":"https://api.github.com/repos/rocketmobile/hstore_accessor/milestones{/number}","notifications_url":"https://api.github.com/repos/rocketmobile/hstore_accessor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rocketmobile/hstore_accessor/labels{/name}","releases_url":"https://api.github.com/repos/rocketmobile/hstore_accessor/releases{/id}","created_at":"2015-01-09T15:36:54Z","updated_at":"2015-01-09T17:13:44Z","pushed_at":"2015-01-22T19:12:50Z","git_url":"git://github.com/rocketmobile/hstore_accessor.git","ssh_url":"git@github.com:rocketmobile/hstore_accessor.git","clone_url":"https://github.com/rocketmobile/hstore_accessor.git","svn_url":"https://github.com/rocketmobile/hstore_accessor","homepage":null,"size":229,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"devmynd:master","ref":"master","sha":"d27a643cd39596f8688a9d86b2feab118b6a2b8c","user":{"login":"devmynd","id":785007,"avatar_url":"https://avatars.githubusercontent.com/u/785007?v=3","gravatar_id":"","url":"https://api.github.com/users/devmynd","html_url":"https://github.com/devmynd","followers_url":"https://api.github.com/users/devmynd/followers","following_url":"https://api.github.com/users/devmynd/following{/other_user}","gists_url":"https://api.github.com/users/devmynd/gists{/gist_id}","starred_url":"https://api.github.com/users/devmynd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devmynd/subscriptions","organizations_url":"https://api.github.com/users/devmynd/orgs","repos_url":"https://api.github.com/users/devmynd/repos","events_url":"https://api.github.com/users/devmynd/events{/privacy}","received_events_url":"https://api.github.com/users/devmynd/received_events","type":"Organization","site_admin":false},"repo":{"id":10557354,"name":"hstore_accessor","full_name":"devmynd/hstore_accessor","owner":{"login":"devmynd","id":785007,"avatar_url":"https://avatars.githubusercontent.com/u/785007?v=3","gravatar_id":"","url":"https://api.github.com/users/devmynd","html_url":"https://github.com/devmynd","followers_url":"https://api.github.com/users/devmynd/followers","following_url":"https://api.github.com/users/devmynd/following{/other_user}","gists_url":"https://api.github.com/users/devmynd/gists{/gist_id}","starred_url":"https://api.github.com/users/devmynd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/devmynd/subscriptions","organizations_url":"https://api.github.com/users/devmynd/orgs","repos_url":"https://api.github.com/users/devmynd/repos","events_url":"https://api.github.com/users/devmynd/events{/privacy}","received_events_url":"https://api.github.com/users/devmynd/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/devmynd/hstore_accessor","description":"Adds typed hstore-backed field support to ActiveRecord models.","fork":false,"url":"https://api.github.com/repos/devmynd/hstore_accessor","forks_url":"https://api.github.com/repos/devmynd/hstore_accessor/forks","keys_url":"https://api.github.com/repos/devmynd/hstore_accessor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/devmynd/hstore_accessor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/devmynd/hstore_accessor/teams","hooks_url":"https://api.github.com/repos/devmynd/hstore_accessor/hooks","issue_events_url":"https://api.github.com/repos/devmynd/hstore_accessor/issues/events{/number}","events_url":"https://api.github.com/repos/devmynd/hstore_accessor/events","assignees_url":"https://api.github.com/repos/devmynd/hstore_accessor/assignees{/user}","branches_url":"https://api.github.com/repos/devmynd/hstore_accessor/branches{/branch}","tags_url":"https://api.github.com/repos/devmynd/hstore_accessor/tags","blobs_url":"https://api.github.com/repos/devmynd/hstore_accessor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/devmynd/hstore_accessor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/devmynd/hstore_accessor/git/refs{/sha}","trees_url":"https://api.github.com/repos/devmynd/hstore_accessor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/devmynd/hstore_accessor/statuses/{sha}","languages_url":"https://api.github.com/repos/devmynd/hstore_accessor/languages","stargazers_url":"https://api.github.com/repos/devmynd/hstore_accessor/stargazers","contributors_url":"https://api.github.com/repos/devmynd/hstore_accessor/contributors","subscribers_url":"https://api.github.com/repos/devmynd/hstore_accessor/subscribers","subscription_url":"https://api.github.com/repos/devmynd/hstore_accessor/subscription","commits_url":"https://api.github.com/repos/devmynd/hstore_accessor/commits{/sha}","git_commits_url":"https://api.github.com/repos/devmynd/hstore_accessor/git/commits{/sha}","comments_url":"https://api.github.com/repos/devmynd/hstore_accessor/comments{/number}","issue_comment_url":"https://api.github.com/repos/devmynd/hstore_accessor/issues/comments/{number}","contents_url":"https://api.github.com/repos/devmynd/hstore_accessor/contents/{+path}","compare_url":"https://api.github.com/repos/devmynd/hstore_accessor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/devmynd/hstore_accessor/merges","archive_url":"https://api.github.com/repos/devmynd/hstore_accessor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/devmynd/hstore_accessor/downloads","issues_url":"https://api.github.com/repos/devmynd/hstore_accessor/issues{/number}","pulls_url":"https://api.github.com/repos/devmynd/hstore_accessor/pulls{/number}","milestones_url":"https://api.github.com/repos/devmynd/hstore_accessor/milestones{/number}","notifications_url":"https://api.github.com/repos/devmynd/hstore_accessor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/devmynd/hstore_accessor/labels{/name}","releases_url":"https://api.github.com/repos/devmynd/hstore_accessor/releases{/id}","created_at":"2013-06-07T19:29:04Z","updated_at":"2015-01-22T17:11:09Z","pushed_at":"2015-01-15T06:38:40Z","git_url":"git://github.com/devmynd/hstore_accessor.git","ssh_url":"git@github.com:devmynd/hstore_accessor.git","clone_url":"https://github.com/devmynd/hstore_accessor.git","svn_url":"https://github.com/devmynd/hstore_accessor","homepage":null,"size":720,"stargazers_count":159,"watchers_count":159,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":24,"mirror_url":null,"open_issues_count":4,"forks":24,"open_issues":4,"watchers":159,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/devmynd/hstore_accessor/pulls/51"},"html":{"href":"https://github.com/devmynd/hstore_accessor/pull/51"},"issue":{"href":"https://api.github.com/repos/devmynd/hstore_accessor/issues/51"},"comments":{"href":"https://api.github.com/repos/devmynd/hstore_accessor/issues/51/comments"},"review_comments":{"href":"https://api.github.com/repos/devmynd/hstore_accessor/pulls/51/comments"},"review_comment":{"href":"https://api.github.com/repos/devmynd/hstore_accessor/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/devmynd/hstore_accessor/pulls/51/commits"},"statuses":{"href":"https://api.github.com/repos/devmynd/hstore_accessor/statuses/d27a643cd39596f8688a9d86b2feab118b6a2b8c"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":2,"review_comments":0,"commits":0,"additions":0,"deletions":0,"changed_files":0}}