File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 15911591 // If a timezone is different in tp, keep the timezone as is
15921592 if ( tp_inst ) {
15931593 // look out for DST if tz wasn't specified
1594- if ( tp_inst . _defaults . timezone === null ) {
1594+ if ( ! tp_inst . support . timezone && tp_inst . _defaults . timezone === null ) {
15951595 tp_inst . timezone = tp_date . getTimezoneOffset ( ) * - 1 ;
15961596 }
15971597 date = $ . timepicker . timezoneAdjust ( date , tp_inst . timezone ) ;
16301630 // object will only return the timezone offset for the current locale, so we
16311631 // adjust it accordingly. If not using timezone option this won't matter..
16321632 if ( tp_inst . timezone != null ) {
1633+ // look out for DST if tz wasn't specified
1634+ if ( ! tp_inst . support . timezone && tp_inst . _defaults . timezone === null ) {
1635+ tp_inst . timezone = date . getTimezoneOffset ( ) * - 1 ;
1636+ }
16331637 date = $ . timepicker . timezoneAdjust ( date , tp_inst . timezone ) ;
16341638 }
16351639 }
You can’t perform that action at this time.
0 commit comments