Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Time + MonthSpan invalid result #8741

Closed
anykeyh opened this issue Feb 4, 2020 · 0 comments · Fixed by #8742
Closed

Time + MonthSpan invalid result #8741

anykeyh opened this issue Feb 4, 2020 · 0 comments · Fixed by #8742
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib:time

Comments

@anykeyh
Copy link

anykeyh commented Feb 4, 2020

Here is a simple test where the result is wrong in my opinion:

test = Time.parse!("2020-02-05 00:13:41 +07:00", "%Y-%m-%d %H:%M:%S %z")

puts(test + 3.months) # Should be 2020-05-05 00:13:41 +07:00
# Current result: 2020-05-04 00:13:41 +07:00

https://play.crystal-lang.org/#/r/8ifo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib:time
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants