From: Andrzej Popowski Date: Thu, 25 Jun 2015 09:22:55 +0000 (+0200) Subject: [Time] - fixing a bug in the tizen.TZDate.toLocaleTimezone function X-Git-Tag: submit/tizen/20150702.103311^2~2^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8c4b603a3b022493fc929ad7fc622ec7a592b118;p=platform%2Fcore%2Fapi%2Fwebapi-plugins.git [Time] - fixing a bug in the tizen.TZDate.toLocaleTimezone function TCT results of Alarm, Calendar and Time have not changed. They are 100% Change-Id: I448e0c39d27b1795711509947a7cb4e37a756844 Signed-off-by: Andrzej Popowski --- diff --git a/src/time/time_api.js b/src/time/time_api.js index aba4258c..0d4afaef 100644 --- a/src/time/time_api.js +++ b/src/time/time_api.js @@ -549,9 +549,8 @@ tizen.TZDate.prototype.toTimezone = function() { if (!args.timezone) throw new WebAPIException(WebAPIException.INVALID_VALUES_ERR); - var d = new tizen.TZDate(new Date(this.date_.getTime()), args.timezone); - return d.addDuration(new tizen.TimeDuration((getTimezoneOffset(args.timezone) * 1) + - (getTimezoneOffset(this.timezone_) * -1))); + + return new tizen.TZDate(new Date(this.date_.getTime()), args.timezone); }; tizen.TZDate.prototype.toLocalTimezone = function() {