]> git.proxmox.com Git - pve-manager-legacy.git/commitdiff
Fix #1266: use a renderer when displaying Unix timestamps.
authorEmmanuel Kasper <e.kasper@proxmox.com>
Tue, 31 Jan 2017 15:48:50 +0000 (16:48 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 1 Feb 2017 09:09:58 +0000 (10:09 +0100)
The timestamp is displayed read only in a large window, and not sortable,
hence we use the human readable renderer.

www/manager6/qemu/Snapshot.js

index d438d6857635454bd7294077c9444f557ba7cef3..3c12888f92b5c11e1aa1a1243a3140d91b55520f 100644 (file)
@@ -80,6 +80,7 @@ Ext.define('PVE.window.Snapshot', {
            items.push({
                xtype: 'displayfield',
                name: 'snaptime',
+               renderer: PVE.Utils.render_timestamp_human_readable,
                fieldLabel: gettext('Timestamp')
            });
        } else {
@@ -199,7 +200,7 @@ Ext.define('PVE.window.Snapshot', {
                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);
            }
        });