{"action":"created","issue":{"url":"https://api.github.com/repos/moment/moment/issues/4754","repository_url":"https://api.github.com/repos/moment/moment","labels_url":"https://api.github.com/repos/moment/moment/issues/4754/labels{/name}","comments_url":"https://api.github.com/repos/moment/moment/issues/4754/comments","events_url":"https://api.github.com/repos/moment/moment/issues/4754/events","html_url":"https://github.com/moment/moment/issues/4754","id":355312430,"node_id":"MDU6SXNzdWUzNTUzMTI0MzA=","number":4754,"title":"2013-03-10T00:00:00.000Z + 1 day != 2013-03-10T23:00:00.000Z","user":{"login":"createthis","id":1695880,"node_id":"MDQ6VXNlcjE2OTU4ODA=","avatar_url":"https://avatars1.githubusercontent.com/u/1695880?v=4","gravatar_id":"","url":"https://api.github.com/users/createthis","html_url":"https://github.com/createthis","followers_url":"https://api.github.com/users/createthis/followers","following_url":"https://api.github.com/users/createthis/following{/other_user}","gists_url":"https://api.github.com/users/createthis/gists{/gist_id}","starred_url":"https://api.github.com/users/createthis/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/createthis/subscriptions","organizations_url":"https://api.github.com/users/createthis/orgs","repos_url":"https://api.github.com/users/createthis/repos","events_url":"https://api.github.com/users/createthis/events{/privacy}","received_events_url":"https://api.github.com/users/createthis/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-29T20:04:39Z","updated_at":"2018-08-30T16:06:49Z","closed_at":null,"author_association":"NONE","body":"**Description of the Issue and Steps to Reproduce:**\r\n\r\nMaybe I'm missing something, but I think this is a bug:\r\n\r\n```js\r\nimport moment from 'moment';\r\nlet date = new Date('2013-03-10 00:00:00 UTC');\r\nlet next = moment(date).add(1, 'days').toDate();\r\nconsole.log(\"date=\",date,\"next=\",next);\r\n```\r\n\r\n## Output:\r\n\r\n```\r\ndate= 2013-03-10T00:00:00.000Z next= 2013-03-10T23:00:00.000Z\r\n```\r\n\r\n## Expected Output:\r\n\r\n```\r\ndate= 2013-03-10T00:00:00.000Z next= 2013-03-11T00:00:00.000Z\r\n```\r\n\r\n## Hypothesis:\r\n\r\nThis may be related to daylight savings time. the UTC version behaves as expected:\r\n\r\n```js\r\nlet next = moment(date).utc().add(1, 'days').toDate();\r\n```\r\n\r\n**Environment:**\r\n\r\n```\r\n$ node -v\r\nv8.6.0\r\n```"},"comment":{"url":"https://api.github.com/repos/moment/moment/issues/comments/417374591","html_url":"https://github.com/moment/moment/issues/4754#issuecomment-417374591","issue_url":"https://api.github.com/repos/moment/moment/issues/4754","id":417374591,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNzM3NDU5MQ==","user":{"login":"ashsearle","id":1166814,"node_id":"MDQ6VXNlcjExNjY4MTQ=","avatar_url":"https://avatars2.githubusercontent.com/u/1166814?v=4","gravatar_id":"","url":"https://api.github.com/users/ashsearle","html_url":"https://github.com/ashsearle","followers_url":"https://api.github.com/users/ashsearle/followers","following_url":"https://api.github.com/users/ashsearle/following{/other_user}","gists_url":"https://api.github.com/users/ashsearle/gists{/gist_id}","starred_url":"https://api.github.com/users/ashsearle/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ashsearle/subscriptions","organizations_url":"https://api.github.com/users/ashsearle/orgs","repos_url":"https://api.github.com/users/ashsearle/repos","events_url":"https://api.github.com/users/ashsearle/events{/privacy}","received_events_url":"https://api.github.com/users/ashsearle/received_events","type":"User","site_admin":false},"created_at":"2018-08-30T16:06:49Z","updated_at":"2018-08-30T16:06:49Z","author_association":"CONTRIBUTOR","body":"They're not \"UTC dates', they're just dates, representing a point in time.\r\n\r\nI believe the output of `console.log` shows Z on the end because you're running your code in node(?) which uses `toJSON()` instead of `toString()`.\r\n"}}
{"actor":{"display_login":"ashsearle"}}