Skip to content

Commit 945581f

Browse files
trentrichardson#588 work on getDate setDate timezone conversions
1 parent 6d0e5ba commit 945581f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

jquery-ui-timepicker-addon.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1591,7 +1591,7 @@
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);
@@ -1630,6 +1630,10 @@
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
}

0 commit comments

Comments
 (0)