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

Issue with time zones being misapplied / date-times being off in fetch_survey() #287

Open
jmobrien opened this issue Sep 7, 2022 · 5 comments

Comments

@jmobrien
Copy link
Collaborator

jmobrien commented Sep 7, 2022

Note to users: update #263 on Jun 20 introduced a bug that could lead to date/time variables in the downloaded response dataframe to be off by 1 or more hours. Times displayed would reflect UTC time wrongly interpreted in the local time zone, or some other zone if time_zone was given explicitly.

This bug did not arrive on CRAN, so only downloads made the development version between then and now would have their data affected. The issue should now be fixed.

Re-downloading may be the easiest fix. If that is not possible, you should be able to do the following to correct your response data frame (here called dat):

dat |>
  mutate(
    across(
       c(StartDate, EndDate, RecordedDate),
       ~lubridate::force_tz(.x, "UTC") |> 
           lubridate::with_tz(Sys.timezone()) # Replace Sys.timezone() with alternative if used during download
    )
  )
@juliasilge
Copy link
Collaborator

Always good when bugs get caught before a release! 🐛

@jmobrien
Copy link
Collaborator Author

jmobrien commented Sep 9, 2022

Indeed. Speaking of which, do I need to get up to speed on any plans for the next release, in terms of update goals, timelines, or both?

@juliasilge
Copy link
Collaborator

I'll be honest @jmobrien that I don't have many grand plans or goals for a next release here. 🙈 I would guess not super soon, since there are not that a ton of user-facing changes since the last release yet and none of extremely urgent? That bug fix would be nice to get to folks before the end of the year, for sure, and by then there will probably be a few more updates.

@jmobrien
Copy link
Collaborator Author

That makes sense; I think I was feeling similarly. One goal I've been wondering about is whether one key goal before the next (substantial) release should be to clear out all the V2 stuff (column_map(), metadata() survey_questions()), updating where appropriate. That would help clarify the package and improve ongoing maintenance a lot, I'd think.

@juliasilge
Copy link
Collaborator

That would be amazing to get done!

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

2 participants