shiny icon indicating copy to clipboard operation
shiny copied to clipboard

Issue with dateInput() and possibly daylight savings.

Open williamlai2 opened this issue 4 years ago • 2 comments

This is the same issue mentioned in #3103 (which refers to the fix in #2204 and the fix in #2212) and is still a problem. The value of the date picker cannot be set to the day that daylight savings changes. In the example below, the end date is blank. The other examples in the previous issue are still issues as well.

image

library(shiny)
Sys.setenv(TZ = "Australia/Melbourne") 

ui <- fluidPage(
  dateRangeInput(inputId = "selectedDateRange", 
                 label = "",
                 start = "2020-01-19", 
                 end = "2021-10-03",
                 min = "2020-01-19",
                 max = "2021-10-03")
)

server <- function(input, output, session) { }

shinyApp(ui, server)
> sessionInfo()
R version 4.0.3 (2020-10-10)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.5 LTS

Matrix products: default
BLAS:   /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1

locale:
 [1] LC_CTYPE=C.UTF-8       LC_NUMERIC=C           LC_TIME=C.UTF-8        LC_COLLATE=C.UTF-8     LC_MONETARY=C.UTF-8    LC_MESSAGES=C.UTF-8    LC_PAPER=C.UTF-8      
 [8] LC_NAME=C              LC_ADDRESS=C           LC_TELEPHONE=C         LC_MEASUREMENT=C.UTF-8 LC_IDENTIFICATION=C   

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] shiny_1.7.1

loaded via a namespace (and not attached):
 [1] Rcpp_1.0.7       packrat_0.5.0    digest_0.6.27    later_1.3.0      mime_0.11        R6_2.5.1         jsonlite_1.7.2   lifecycle_1.0.0  xtable_1.8-4    
[10] magrittr_2.0.1   cachem_1.0.4     rlang_0.4.11     promises_1.2.0.1 jquerylib_0.1.3  bslib_0.3.0      ellipsis_0.3.2   tools_4.0.3      httpuv_1.5.5    
[19] fastmap_1.1.0    compiler_4.0.3   htmltools_0.5.2  sass_0.4.0      

williamlai2 avatar Oct 04 '21 00:10 williamlai2

Sys.setenv(TZ = "Australia/Melbourne") is not sufficient to reproduce this issue on my mac--I had to actually change my time zone to Melbourne in system preferences to reproduce this.

Repro'd on 1.7.1 and rc-1.7.2 without the Sys.setenv(TZ = "Australia/Melbourne") line by changing the time zone to Melbourne in system preferences.

dvg-p4 avatar Jul 06 '22 14:07 dvg-p4

Thanks. For reference I am running on a VM with the timezone in UTC by default, but working in Melbourne with the need for those dates.

williamlai2 avatar Jul 06 '22 20:07 williamlai2