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

updateAirDateInput() behaviour inconsistent when server and client timezones differ #695

Open
hdmm3 opened this issue May 6, 2024 · 0 comments

Comments

@hdmm3
Copy link

hdmm3 commented May 6, 2024

I'm having an issue when calling updateAirDateInput(). The input datetime is never the one returned by the widget (through input$dateInput). This seems to happen only when the shiny server is running at a different timezone as the client. On the server side the timezone is picked through Sys.timezone() here and then that date is shifted to the client timezone. If both client and server timezones are the same they will coincide, but if they don't, the incorrect shifting will happen. A quick way to test this issue is by calling something like this:

updateAirDateInput(
   inputId = "theDateInput",
   value = input$theDateInput
)

Which should keep the value constant, but if the server and client timezones are different, the value will keep shifting the datetime at every call. Different timezones between server and client can be tested locally by running a rocker image with the app, which is set to UTC by default. The shiny client will pick your local timezone from the browser.

Originally posted by @hdmm3 in #643 (comment)

@hdmm3 hdmm3 changed the title updateAirDateInput() struggling when server and client timezones differ updateAirDateInput() behaviour inconsistent when server and client timezones differ May 15, 2024
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