diff options
author | Trent Richardson <trentdrichardson@gmail.com> | 2013-05-31 13:12:41 -0400 |
---|---|---|
committer | Trent Richardson <trentdrichardson@gmail.com> | 2013-05-31 13:12:41 -0400 |
commit | 945581ffd799ac19eeb9789bb9502c332f23ec67 (patch) | |
tree | 4d92dd7a175cae6b49fe3760c28ed6720a5a5e5d | |
parent | 6d0e5ba3459b6ee61167c75af25bcb608c7cba79 (diff) | |
download | jQuery-Timepicker-Addon-945581ffd799ac19eeb9789bb9502c332f23ec67.zip jQuery-Timepicker-Addon-945581ffd799ac19eeb9789bb9502c332f23ec67.tar.gz jQuery-Timepicker-Addon-945581ffd799ac19eeb9789bb9502c332f23ec67.tar.bz2 |
#588 work on getDate setDate timezone conversions
-rw-r--r-- | jquery-ui-timepicker-addon.js | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/jquery-ui-timepicker-addon.js b/jquery-ui-timepicker-addon.js index e89e727..b8c5ae4 100644 --- a/jquery-ui-timepicker-addon.js +++ b/jquery-ui-timepicker-addon.js @@ -1591,7 +1591,7 @@ // If a timezone is different in tp, keep the timezone as is if(tp_inst){ // look out for DST if tz wasn't specified - if(tp_inst._defaults.timezone === null){ + if(!tp_inst.support.timezone && tp_inst._defaults.timezone === null){ tp_inst.timezone = tp_date.getTimezoneOffset()*-1; } date = $.timepicker.timezoneAdjust(date, tp_inst.timezone); @@ -1630,6 +1630,10 @@ // object will only return the timezone offset for the current locale, so we // adjust it accordingly. If not using timezone option this won't matter.. if(tp_inst.timezone != null){ + // look out for DST if tz wasn't specified + if(!tp_inst.support.timezone && tp_inst._defaults.timezone === null){ + tp_inst.timezone = date.getTimezoneOffset()*-1; + } date = $.timepicker.timezoneAdjust(date, tp_inst.timezone); } } |