comparison app/view/window/GenProbenFromMessprogramm.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 b98e3af27424
children 39d98891881c
comparison
equal deleted inserted replaced
1190:d7bcd31ceaa6 1191:62f374ea7ab7
46 scope: this, 46 scope: this,
47 handler: this.close 47 handler: this.close
48 }, { 48 }, {
49 text: i18n.getMsg('generateproben'), 49 text: i18n.getMsg('generateproben'),
50 handler: function() { 50 handler: function() {
51 var startDate = new Date(me.down('datefield[name=start]').getValue());
52 var startUTC = Date.UTC(
53 startDate.getFullYear(), startDate.getMonth(), startDate.getDate());
54 var endDate = new Date(me.down('datefield[name=end]').getValue());
55 var endUTC = Date.UTC(
56 endDate.getFullYear(), endDate.getMonth(), endDate.getDate());
51 var jsondata = { 57 var jsondata = {
52 id: me.record.id, 58 id: me.record.id,
53 start: new Date(me.down('datefield[name=start]').getValue()).valueOf(), 59 start: startUTC,
54 end: new Date(me.down('datefield[name=end]').getValue()).valueOf() 60 end: endUTC
55 }; 61 };
56
57 62
58 Ext.Ajax.request({ 63 Ext.Ajax.request({
59 url: 'lada-server/rest/probe/messprogramm', 64 url: 'lada-server/rest/probe/messprogramm',
60 method: 'POST', 65 method: 'POST',
61 jsonData: jsondata, 66 jsonData: jsondata,

http://lada.wald.intevation.org