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

Adding zero #4

Open
mattBrzezinski opened this issue Mar 10, 2021 · 0 comments
Open

Adding zero #4

mattBrzezinski opened this issue Mar 10, 2021 · 0 comments

Comments

@mattBrzezinski
Copy link
Member

When adding TimePeriods of zero we can end up with INVALID LaxZonedDateTime instances rather than returning instance we are given:

julia> using LaxZonedDateTimes, TimeZones, Base.Dates

julia> lzdt = LaxZonedDateTime(DateTime(2015,3,8,2), tz"America/Winnipeg")
2015-03-08T02:00:00-DNE

julia> lzdt + Hour(1)
INVALID

julia> lzdt + Day(1)
2015-03-09T02:00:00-05:00

julia> lzdt + Hour(0) # Should just be `2015-03-08T02:00:00-DNE`
INVALID

julia> lzdt + Day(0)
2015-03-08T02:00:00-DNE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant