{"action":"opened","issue":{"url":"https://api.github.com/repos/crystal-lang/crystal/issues/6522","repository_url":"https://api.github.com/repos/crystal-lang/crystal","labels_url":"https://api.github.com/repos/crystal-lang/crystal/issues/6522/labels{/name}","comments_url":"https://api.github.com/repos/crystal-lang/crystal/issues/6522/comments","events_url":"https://api.github.com/repos/crystal-lang/crystal/issues/6522/events","html_url":"https://github.com/crystal-lang/crystal/issues/6522","id":349700065,"node_id":"MDU6SXNzdWUzNDk3MDAwNjU=","number":6522,"title":"Time + Time::MonthSpan inaccurate around DST change","user":{"login":"HCLarsen","id":8650607,"node_id":"MDQ6VXNlcjg2NTA2MDc=","avatar_url":"https://avatars0.githubusercontent.com/u/8650607?v=4","gravatar_id":"","url":"https://api.github.com/users/HCLarsen","html_url":"https://github.com/HCLarsen","followers_url":"https://api.github.com/users/HCLarsen/followers","following_url":"https://api.github.com/users/HCLarsen/following{/other_user}","gists_url":"https://api.github.com/users/HCLarsen/gists{/gist_id}","starred_url":"https://api.github.com/users/HCLarsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/HCLarsen/subscriptions","organizations_url":"https://api.github.com/users/HCLarsen/orgs","repos_url":"https://api.github.com/users/HCLarsen/repos","events_url":"https://api.github.com/users/HCLarsen/events{/privacy}","received_events_url":"https://api.github.com/users/HCLarsen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-08-11T02:52:54Z","updated_at":"2018-08-11T02:52:54Z","closed_at":null,"author_association":"NONE","body":"When adding or subtracting a Span or MonthSpan to a Time object that isn't UTC, the result is off by an hour. It appears that it's adding a specific number of seconds instead of days, weeks, months or years, as you would expect.\r\n\r\n```\r\ntime = Time.utc(1997, 10, 21, 9, 0, 0)\r\ntime + 1.weeks  #=> 1997-10-28 09:00:00.0 UTC\r\n\r\ntime = Time.new(1997, 10, 21, 9, 0, 0)\r\ntime + 1.weeks  #=> 1997-10-28 08:00:00.0 -05:00 Local\r\n\r\ntime = Time.new(1997, 10, 25, 9, 0, 0, location: Time::Location.load(\"America/Toronto\"))\r\ntime + 1.days  #=> 1997-10-26 08:00:00.0 -05:00 Local\r\n```"}}
{"actor":{"display_login":"HCLarsen"}}