mirror of
https://github.com/rstudio/shiny.git
synced 2026-02-09 14:15:40 -05:00
24 lines
824 B
Diff
24 lines
824 B
Diff
diff --git a/inst/www/shared/datepicker/js/bootstrap-datepicker.js b/inst/www/shared/datepicker/js/bootstrap-datepicker.js
|
|
index 76a99fc2..97f5c086 100644
|
|
--- a/inst/www/shared/datepicker/js/bootstrap-datepicker.js
|
|
+++ b/inst/www/shared/datepicker/js/bootstrap-datepicker.js
|
|
@@ -529,7 +529,17 @@
|
|
},
|
|
|
|
_utc_to_local: function(utc){
|
|
- return utc && new Date(utc.getTime() + (utc.getTimezoneOffset()*60000));
|
|
+
|
|
+ if (!utc) return utc;
|
|
+
|
|
+ var local = new Date(utc.getTime() + (utc.getTimezoneOffset() * 60000));
|
|
+
|
|
+ if (local.getTimezoneOffset() != utc.getTimezoneOffset())
|
|
+ {
|
|
+ local = new Date(utc.getTime() + (local.getTimezoneOffset() * 60000));
|
|
+ }
|
|
+
|
|
+ return utc && local;
|
|
},
|
|
_local_to_utc: function(local){
|
|
return local && new Date(local.getTime() - (local.getTimezoneOffset()*60000));
|