@@ -69,6 +69,7 @@ function Timepicker() {
69
69
second : 0 ,
70
70
millisec : 0 ,
71
71
timezone : null ,
72
+ useLocalTimezone : false ,
72
73
defaultTimezone : "+0000" ,
73
74
hourMin : 0 ,
74
75
minuteMin : 0 ,
@@ -112,7 +113,6 @@ $.extend(Timepicker.prototype, {
112
113
second : 0 ,
113
114
millisec : 0 ,
114
115
timezone : null ,
115
- useLocalTimezone : false ,
116
116
defaultTimezone : "+0000" ,
117
117
hourMinOriginal : null ,
118
118
minuteMinOriginal : null ,
@@ -458,7 +458,7 @@ $.extend(Timepicker.prototype, {
458
458
}
459
459
}
460
460
this . timezone_select . change ( function ( ) {
461
- tp_inst . useLocalTimezone = false ;
461
+ tp_inst . _defaults . useLocalTimezone = false ;
462
462
tp_inst . _onTimeChange ( ) ;
463
463
} ) ;
464
464
@@ -1072,7 +1072,7 @@ $.datepicker._updateDatepicker = function(inst) {
1072
1072
if ( tp_inst ) {
1073
1073
tp_inst . _addTimePicker ( inst ) ;
1074
1074
1075
- if ( tp_inst . useLocalTimezone ) { //checks daylight saving with the new date.
1075
+ if ( tp_inst . _defaults . useLocalTimezone ) { //checks daylight saving with the new date.
1076
1076
var date = new Date ( inst . selectedYear , inst . selectedMonth , inst . selectedDay , 12 ) ;
1077
1077
selectLocalTimeZone ( tp_inst , date ) ;
1078
1078
tp_inst . _onTimeChange ( ) ;
@@ -1421,7 +1421,7 @@ var parseDateTimeInternal = function(dateFormat, timeFormat, dateTimeString, dat
1421
1421
var selectLocalTimeZone = function ( tp_inst , date )
1422
1422
{
1423
1423
if ( tp_inst && tp_inst . _defaults . showTimezone && tp_inst . timezone_select ) {
1424
- tp_inst . useLocalTimezone = true ;
1424
+ tp_inst . _defaults . useLocalTimezone = true ;
1425
1425
var now = typeof date !== 'undefined' ? date : new Date ( ) ;
1426
1426
var tzoffset = now . getTimezoneOffset ( ) ; // If +0100, returns -60
1427
1427
var tzsign = tzoffset > 0 ? '-' : '+' ;
0 commit comments