Commit 1fe67f2c6a7d8372e722eb905fd3ad6521ffc582
1 parent
217e6c35
Exists in
master
and in
66 other branches
progress
Showing
5 changed files
with
9 additions
and
13 deletions
Show diff stats
js/app/models/TimeTable.js
... | ... | @@ -29,19 +29,15 @@ Ext.define('amdaModel.Interval', { |
29 | 29 | { name: 'start', type : 'date', defaultValue : new Date(), |
30 | 30 | convert: function(value,rec) { |
31 | 31 | if (!Ext.isDate(value)){ |
32 | - var valueString = new String(value); | |
33 | - var date = new Date(valueString.replace(/\-/g,'\/').replace(/[T|Z]/g,' ')); | |
34 | - return date; | |
32 | + return new Date(value); | |
35 | 33 | } |
36 | 34 | return value; |
37 | 35 | } |
38 | 36 | }, |
39 | 37 | { name: 'stop', type : 'date', defaultValue : new Date(), |
40 | 38 | convert: function(value,rec) { |
41 | - if (!Ext.isDate(value)){ | |
42 | - var valueString = new String(value); | |
43 | - var date = new Date(valueString.replace(/\-/g,'\/').replace(/[T|Z]/g,' ')); | |
44 | - return date; | |
39 | + if (!Ext.isDate(value)){ | |
40 | + return new Date(value); | |
45 | 41 | } |
46 | 42 | return value; |
47 | 43 | } | ... | ... |
js/app/views/TimeTableUI.js
... | ... | @@ -510,8 +510,8 @@ Ext.define('amdaUI.TimeTableUI', { |
510 | 510 | {type: 'numeric', dataIndex: 'durationHour'}, |
511 | 511 | {type: 'numeric', dataIndex: 'durationMin'}, |
512 | 512 | {type: 'numeric', dataIndex: 'durationSec'}, |
513 | - {type: 'date', dataIndex: 'start', dateFormat: 'Y-m-d'}, | |
514 | - {type: 'date', dataIndex: 'stop', dateFormat: 'Y-m-d'} | |
513 | + {type: 'date', dataIndex: 'start', dateFormat: 'c'}, | |
514 | + {type: 'date', dataIndex: 'stop', dateFormat: 'c'} | |
515 | 515 | ] |
516 | 516 | }; |
517 | 517 | var cellEditing = Ext.create('Ext.grid.plugin.CellEditing', { | ... | ... |
php/classes/TimeTableCacheMgr.php
... | ... | @@ -240,10 +240,10 @@ |
240 | 240 | $index = 0; |
241 | 241 | |
242 | 242 | if (!isset($start)) |
243 | - $start = date('Y-m-d\TH:i:s'); | |
243 | + $start = date('Y-m-d\TH:i:s.u'); | |
244 | 244 | |
245 | 245 | if (!isset($stop)) |
246 | - $stop = date('Y-m-d\TH:i:s'); | |
246 | + $stop = date('Y-m-d\TH:i:s.u'); | |
247 | 247 | |
248 | 248 | $this->cache->addInterval(array('start' => $start, 'stop' => $stop), true, $index); |
249 | 249 | ... | ... |
php/classes/TimeTableMgr.php
... | ... | @@ -200,7 +200,7 @@ class TimeTableMgr extends AmdaObjectMgr |
200 | 200 | } |
201 | 201 | |
202 | 202 | $this->id = $this->setId(); |
203 | - $this->created = date('Y-m-d\TH:i:s'); | |
203 | + $this->created = date('Y-m-d\TH:i:s.u'); | |
204 | 204 | if (!$this->id) { |
205 | 205 | return ['error' => ID_CREATION_ERROR]; |
206 | 206 | } | ... | ... |