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

print for AnchoredInterval is not ideal for some ZonedDateTime cases #23

Closed
spurll opened this issue May 1, 2018 · 0 comments
Closed

Comments

@spurll
Copy link
Contributor

spurll commented May 1, 2018

julia> interval = AnchoredInterval{Day(1)}(floor(now(tz"America/Winnipeg"), Day(1)))
AnchoredInterval{1 day, TimeZones.ZonedDateTime}(2018-05-01T00:00:00-05:00, Inclusivity(true, false))

julia> string(interval)
"[DB 2018-05-01-05:00)"

This means "day beginning 2018-05-01 in time zone -05:00", but because the time (00:00) is not displayed, it's easy to misinterpret the time zone as a time. Probably best to just display the whole thing (rather than selectively leaving off the time) when using ZonedDateTimes.

spurll added a commit that referenced this issue May 1, 2018
Fixes a corner case in print(::AnchoredInterval{P,ZonedDateTime}) in
which the time is omitted, in which case the time zone might be
mistaken for the time.

Closes #23
@spurll spurll closed this as completed in #24 May 1, 2018
spurll added a commit that referenced this issue May 1, 2018
Fixes a corner case in print(::AnchoredInterval{P,ZonedDateTime}) in
which the time is omitted, in which case the time zone might be
mistaken for the time.

Closes #23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant