Commit 520baf1eeb8c84d0bf6cfe5a1cd057f320b85ea3

Authored by Benjamin Renard
1 parent a89e4cd6

Fix timezone

Showing 1 changed file with 4 additions and 3 deletions   Show diff stats
js/app/views/ParamArgumentsUI.js
... ... @@ -585,7 +585,8 @@ Ext.define('amdaUI.ParamArgumentsUI', {
585 585 var argumentField = Ext.create('Ext.form.field.Date', {
586 586 argId: 'template_' + key,
587 587 fieldLabel: argument.name,
588   - allowBlank: false, format: 'Y/m/d H:i:s.u',
  588 + allowBlank: false,
  589 + format: 'Y/m/d H:i:s.u',
589 590 minValue:'1970/01/01 00:00:00.000',
590 591 value: parseInt(argument.default),
591 592 listeners: {
... ... @@ -594,8 +595,8 @@ Ext.define('amdaUI.ParamArgumentsUI', {
594 595 if (!template_args)
595 596 template_args = {};
596 597  
597   - if(field.isValid() && newValue.getTime() > 0 ){
598   - template_args[key] = newValue.getTime()/1000.;
  598 + if(field.isValid()){
  599 + template_args[key] = (newValue.getTime() - newValue.getTimezoneOffset() * 60000)/1000.;
599 600 }
600 601 else{
601 602 template_args[key] = 0;
... ...