{"action":"created","issue":{"url":"https://api.github.com/repos/bookshelf/bookshelf/issues/1068","repository_url":"https://api.github.com/repos/bookshelf/bookshelf","labels_url":"https://api.github.com/repos/bookshelf/bookshelf/issues/1068/labels{/name}","comments_url":"https://api.github.com/repos/bookshelf/bookshelf/issues/1068/comments","events_url":"https://api.github.com/repos/bookshelf/bookshelf/issues/1068/events","html_url":"https://github.com/bookshelf/bookshelf/issues/1068","id":122974315,"number":1068,"title":"Date not returned in a consistent format.","user":{"login":"VictorioBerra","id":2934507,"avatar_url":"https://avatars0.githubusercontent.com/u/2934507?v=4","gravatar_id":"","url":"https://api.github.com/users/VictorioBerra","html_url":"https://github.com/VictorioBerra","followers_url":"https://api.github.com/users/VictorioBerra/followers","following_url":"https://api.github.com/users/VictorioBerra/following{/other_user}","gists_url":"https://api.github.com/users/VictorioBerra/gists{/gist_id}","starred_url":"https://api.github.com/users/VictorioBerra/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VictorioBerra/subscriptions","organizations_url":"https://api.github.com/users/VictorioBerra/orgs","repos_url":"https://api.github.com/users/VictorioBerra/repos","events_url":"https://api.github.com/users/VictorioBerra/events{/privacy}","received_events_url":"https://api.github.com/users/VictorioBerra/received_events","type":"User","site_admin":false},"labels":[{"id":30805514,"url":"https://api.github.com/repos/bookshelf/bookshelf/labels/bug","name":"bug","color":"fc2929","default":true},{"id":234309108,"url":"https://api.github.com/repos/bookshelf/bookshelf/labels/timestamps","name":"timestamps","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2015-12-18T16:01:18Z","updated_at":"2018-03-04T16:42:03Z","closed_at":null,"author_association":"NONE","body":"When you return a saved model using timestamps, the values are different than when fetching a model.\n# Model\n\n``` Javascript\nvar Response = bookshelf.Model.extend({\n  tableName: 'response',\n  hasTimestamps: true\n});\n```\n# Tests\n\n``` Javascript\nit('Guthub issue.', function(done) {\n    // dbResponsePromise:\n    // a module of mine that returns an instance of bookshelf and bookshelf models...\n    return dbResponsePromise.then(function(models) {\n        return Promise.try(function() {\n            return new models.Response({\n                response: 'my custom response',\n                created_by: 'mr poopie pants'\n            }).save(null, {\n                method: 'insert'\n            });\n        }).then(function(response) {\n            console.log(response.toJSON());\n        }).then(function() {\n            return new models.Response({\n                response: 'my custom response',\n                created_by: 'mr poopie pants'\n            }).fetch({\n                require: true\n            });\n        }).then(function(previouslySavedResponse) {\n            console.log(previouslySavedResponse.toJSON());\n        }).then(function() {\n            done();\n        });\n    });\n});\n```\n# Output\n\n``` Javascript\n{ response: 'my custom response',\n  created_by: 'mr poopie pants',\n  updated_at: Fri Dec 18 2015 15:57:48 GMT+0000 (UTC),\n  created_at: Fri Dec 18 2015 15:57:48 GMT+0000 (UTC),\n  id: 11872 }\n\n// NOTE THE DIFFERENCE ON updated_at, created_at\n\n{ response: 'my custom response',\n  created_by: 'mr poopie pants',\n  id: 11872,\n  created_at: 1450454268399,\n  updated_at: 1450454268399 }\n```\n"},"comment":{"url":"https://api.github.com/repos/bookshelf/bookshelf/issues/comments/370243339","html_url":"https://github.com/bookshelf/bookshelf/issues/1068#issuecomment-370243339","issue_url":"https://api.github.com/repos/bookshelf/bookshelf/issues/1068","id":370243339,"user":{"login":"ricardograca","id":1457035,"avatar_url":"https://avatars1.githubusercontent.com/u/1457035?v=4","gravatar_id":"","url":"https://api.github.com/users/ricardograca","html_url":"https://github.com/ricardograca","followers_url":"https://api.github.com/users/ricardograca/followers","following_url":"https://api.github.com/users/ricardograca/following{/other_user}","gists_url":"https://api.github.com/users/ricardograca/gists{/gist_id}","starred_url":"https://api.github.com/users/ricardograca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ricardograca/subscriptions","organizations_url":"https://api.github.com/users/ricardograca/orgs","repos_url":"https://api.github.com/users/ricardograca/repos","events_url":"https://api.github.com/users/ricardograca/events{/privacy}","received_events_url":"https://api.github.com/users/ricardograca/received_events","type":"User","site_admin":false},"created_at":"2018-03-04T16:42:03Z","updated_at":"2018-03-04T16:42:03Z","author_association":"OWNER","body":"Reopening this since it's still an issue."}}
{"actor":{"display_login":"ricardograca"}}