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.
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 throughSys.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: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 https://github.com/dreamRs/shinyWidgets/issues/643#issuecomment-2091824003