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

support for tz argument in time_floor #27

Open
era127 opened this issue Jun 25, 2023 · 0 comments
Open

support for tz argument in time_floor #27

era127 opened this issue Jun 25, 2023 · 0 comments

Comments

@era127
Copy link

era127 commented Jun 25, 2023

In the time_floor(x, 'days') function when unit = 'days' it does not seem possible to specify the timezone when the day starts. It defaults to the tz of x. Is that an argument you would consider adding?

It is possible to specify the time zone in some operations such as in bigquery TIMESTAMP_TRUNC sql and would be nice to use in regular r through dplyr translations. For example:

TIMESTAMP_TRUNC(TIMESTAMP '2008-12-25 15:30:00', DAY, 'UTC')
converts to "2008-12-25 00:00:00 UTC"

TIMESTAMP_TRUNC(TIMESTAMP '2008-12-25 15:30:00', DAY, 'America/Los_Angeles')
converts to 2008-12-25 08:00:00 UTC which is 2008-12-25 00:00:00 America/Los_Angeles

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