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

When printing make date-time tzones more clear #173

Closed
hadley opened this issue Sep 21, 2016 · 5 comments
Closed

When printing make date-time tzones more clear #173

hadley opened this issue Sep 21, 2016 · 5 comments

Comments

@hadley
Copy link
Member

hadley commented Sep 21, 2016

library(tibble)
base_time <- function(tz = "") {
  as.POSIXct(strptime("2015-06-01", "%Y-%m-%d", tz = tz))
}

tibble(
  time1 = base_time() + 3600,
  time2 = base_time("UTC") + 3600,
  time3 = base_time("Australia/Lord_Howe") + 3600
)
#> # A tibble: 1 × 3
#>                 time1               time2               time3
#>                <dttm>              <dttm>              <dttm>
#> 1 2015-06-01 01:00:00 2015-06-01 01:00:00 2015-06-01 01:00:00

Those are actually three different times, but you can't easily tell.

Not sure how to best display this information.

@krlmlr
Copy link
Member

krlmlr commented Sep 21, 2016

Time zone is the same for all items in a column, could go to the header:

#> # A tibble: 1 × 3
#>                 time1               time2               time3
#>                <dttm>           <dttm-02>           <dttm+11>
#> 1 2015-06-01 01:00:00 2015-06-01 01:00:00 2015-06-01 01:00:00

See #117 for a related discussion for list columns where all elements have the same type.

@hadley
Copy link
Member Author

hadley commented Sep 21, 2016

They are constant within a column, but can be quite long (e.g. "America/Argentina/ComodRivadavia").

@krlmlr
Copy link
Member

krlmlr commented Sep 21, 2016

That's why I'm suggesting to use the non-DST hour offset, would that be easy to obtain?

@krlmlr
Copy link
Member

krlmlr commented Aug 25, 2017

Closing in favor of the colformat issue.

@krlmlr krlmlr closed this as completed Aug 25, 2017
@github-actions
Copy link
Contributor

This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants