Calculate the time zone offset correctly. bug 445879, r=mrbkap
☠☠ backed out by 0e003f43fcfd ☠ ☠
authorJohn Fitzgerald <jjfitzgerald@gmail.com>
Wed, 23 Jul 2008 12:46:39 -0400
changeset 16144 084567d3ebe69672e9d31d38937748250af1dc7c
parent 16143 b9032fa50289d5b16663b9b61ec12fd55b51694c
child 16145 20bff6157770884464c41d005ad06a83b640f465
child 16147 0e003f43fcfd75f085581d20d05db977cd2c1573
push idunknown
push userunknown
push dateunknown
reviewersmrbkap
bugs445879
milestone1.9.1a2pre
Calculate the time zone offset correctly. bug 445879, r=mrbkap
js/src/jsdate.cpp
--- a/js/src/jsdate.cpp
+++ b/js/src/jsdate.cpp
@@ -1249,17 +1249,17 @@ date_getTimezoneOffset(JSContext *cx, ui
     if (!GetAndCacheLocalTime(cx, obj, NULL, &localtime))
         return JS_FALSE;
 
     /*
      * Return the time zone offset in minutes for the current locale that is
      * appropriate for this time. This value would be a constant except for
      * daylight savings time.
      */
-    result = (utctime - localtime) / msPerMinute;
+    result = (localtime - utctime) / msPerMinute;
     return js_NewNumberInRootedValue(cx, result, vp);
 }
 
 static JSBool
 date_setTime(JSContext *cx, uintN argc, jsval *vp)
 {
     jsdouble result;