comparison app/model/Messprogramm.js @ 1191:62f374ea7ab7

Use UTC date in messprogramm to generate probe objects.
author Raimund Renkert <raimund.renkert@intevation.de>
date Wed, 07 Sep 2016 17:16:26 +0200
parents 61cc583c3649
children 0a7f0a09151c
comparison
equal deleted inserted replaced
1190:d7bcd31ceaa6 1191:62f374ea7ab7
82 } 82 }
83 return v; 83 return v;
84 }, 84 },
85 serialize: function(value) { 85 serialize: function(value) {
86 if (value instanceof Date && !isNaN(value.valueOf())) { 86 if (value instanceof Date && !isNaN(value.valueOf())) {
87 return Ext.Date.getDayOfYear(value); 87 var dayOfYear = Ext.Date.getDayOfYear(value);
88 var offset = value.getTimezoneOffset();
89 if (offset == 0) {
90 return dayOfYear;
91 }
92 return offset > 0 ? dayOfYear - 1 : dayOfYear + 1;
88 } 93 }
89 } 94 }
90 }, { 95 }, {
91 name: 'gueltigBis', 96 name: 'gueltigBis',
92 type: 'date', 97 type: 'date',
110 } 115 }
111 return v; 116 return v;
112 }, 117 },
113 serialize: function(value) { 118 serialize: function(value) {
114 if (value instanceof Date && !isNaN(value.valueOf())) { 119 if (value instanceof Date && !isNaN(value.valueOf())) {
115 return Ext.Date.getDayOfYear(value); 120 var dayOfYear = Ext.Date.getDayOfYear(value);
121 var offset = value.getTimezoneOffset();
122 if (offset == 0) {
123 return dayOfYear;
124 }
125 return offset > 0 ? dayOfYear - 1 : dayOfYear + 1;
116 } 126 }
117 } 127 }
118 }, { 128 }, {
119 name: 'probeNehmerId' 129 name: 'probeNehmerId'
120 }, { 130 }, {

http://lada.wald.intevation.org