]> git.proxmox.com Git - pve-manager-legacy.git/commitdiff
Fix LXC Snapshots Edit Window timestamps
authorEmmanuel Kasper <e.kasper@proxmox.com>
Mon, 19 Jun 2017 14:59:50 +0000 (16:59 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Thu, 22 Jun 2017 07:45:19 +0000 (09:45 +0200)
API calls return dates in seconds where the JS Date() constructor
wants millisecond.

For the correct computation use render_timestamp_human_readable.

A similar fix was commited in aaa89d0b880ea9ab97927872e64d4427bbe2232d
for VMs but Containers missed the fix.

www/manager6/lxc/Snapshot.js

index f09630c1f3dd0ee5d4fd13737fe454ef163357a5..f5e1b24236fea335062287d685fbe445def1cdc3 100644 (file)
@@ -86,6 +86,7 @@ Ext.define('PVE.window.LxcSnapshot', {
            items.push({
                xtype: 'displayfield',
                name: 'snaptime',
+               renderer: PVE.Utils.render_timestamp_human_readable,
                fieldLabel: gettext('Timestamp')
            });
        }
@@ -197,7 +198,7 @@ Ext.define('PVE.window.LxcSnapshot', {
                summarystore.resumeEvents();
                summarystore.fireEvent('refresh', summarystore);
 
-               form.findField('snaptime').setValue(new Date(data.snaptime));
+               form.findField('snaptime').setValue(data.snaptime);
                form.findField('description').setValue(data.description);
            }
        });