@@ -1010,7 +1010,6 @@ Jsonix.XML.Calendar = Jsonix.Class({
10101010 } else {
10111011 this . timezone = NaN ;
10121012 }
1013-
10141013 var initialDate = new Date ( 0 ) ;
10151014 initialDate . setUTCFullYear ( this . year || 1970 ) ;
10161015 initialDate . setUTCMonth ( this . month - 1 || 0 ) ;
@@ -1019,7 +1018,7 @@ Jsonix.XML.Calendar = Jsonix.Class({
10191018 initialDate . setUTCMinutes ( this . minute || 0 ) ;
10201019 initialDate . setUTCSeconds ( this . second || 0 ) ;
10211020 initialDate . setUTCMilliseconds ( ( this . fractionalSecond || 0 ) * 1000 ) ;
1022- var timezoneOffset = - 60000 * ( this . timezoneOffset || 0 ) ;
1021+ var timezoneOffset = - 60000 * ( this . timezone || 0 ) ;
10231022 this . date = new Date ( initialDate . getTime ( ) + timezoneOffset ) ;
10241023 } ,
10251024 CLASS_NAME : "Jsonix.XML.Calendar"
@@ -5447,7 +5446,6 @@ Jsonix.Schema.XSD.GYearMonth = Jsonix.Class(Jsonix.Schema.XSD.Calendar, {
54475446 if ( value instanceof Date ) {
54485447 year = value . getFullYear ( ) ;
54495448 month = value . getMonth ( ) + 1 ;
5450- timezone = value . getTimezoneOffset ( ) * - 1 ;
54515449 } else {
54525450 Jsonix . Util . Ensure . ensureInteger ( value . year ) ;
54535451 year = value . year ;
@@ -5488,7 +5486,6 @@ Jsonix.Schema.XSD.GYear = Jsonix.Class(Jsonix.Schema.XSD.Calendar, {
54885486
54895487 if ( value instanceof Date ) {
54905488 year = value . getFullYear ( ) ;
5491- timezone = value . getTimezoneOffset ( ) * - 1 ;
54925489 } else {
54935490 Jsonix . Util . Ensure . ensureInteger ( value . year ) ;
54945491 year = value . year ;
@@ -5530,7 +5527,6 @@ Jsonix.Schema.XSD.GMonthDay = Jsonix.Class(Jsonix.Schema.XSD.Calendar, {
55305527 if ( value instanceof Date ) {
55315528 month = value . getMonth ( ) + 1 ;
55325529 day = value . getDate ( ) ;
5533- timezone = value . getTimezoneOffset ( ) * - 1 ;
55345530 } else {
55355531 Jsonix . Util . Ensure . ensureInteger ( value . month ) ;
55365532 Jsonix . Util . Ensure . ensureInteger ( value . day ) ;
@@ -5570,7 +5566,6 @@ Jsonix.Schema.XSD.GDay = Jsonix.Class(Jsonix.Schema.XSD.Calendar, {
55705566
55715567 if ( value instanceof Date ) {
55725568 day = value . getDate ( ) ;
5573- timezone = value . getTimezoneOffset ( ) * - 1 ;
55745569 } else {
55755570 Jsonix . Util . Ensure . ensureInteger ( value . day ) ;
55765571 day = value . day ;
@@ -5609,7 +5604,6 @@ Jsonix.Schema.XSD.GMonth = Jsonix.Class(Jsonix.Schema.XSD.Calendar, {
56095604
56105605 if ( value instanceof Date ) {
56115606 month = value . getMonth ( ) + 1 ;
5612- timezone = value . getTimezoneOffset ( ) * - 1 ;
56135607 } else {
56145608 Jsonix . Util . Ensure . ensureInteger ( value . month ) ;
56155609 month = value . month ;
0 commit comments