public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
* [pve-devel] ["PATCH pve-manager"] fix #7081: api: render start- and endtime as timestamps
@ 2025-11-25 15:59 Daniel Herzig
  2025-11-25 16:26 ` [pve-devel] applied: " Thomas Lamprecht
  0 siblings, 1 reply; 2+ messages in thread
From: Daniel Herzig @ 2025-11-25 15:59 UTC (permalink / raw)
  To: pve-devel

As reported on bugzilla [0], currently `pvenode task list` returns
UNIX epochs for start- and endtime instead of timestamps for the
default output format 'text', as opposed to `man 1 pvenode`[1].

This patch adds the timestamp renderer to the return array to address
this discrepancy.

[0] https://bugzilla.proxmox.com/show_bug.cgi?id=7081
[1] https://pve.proxmox.com/pve-docs/pvenode.1.html -- see `FORMAT_OPTIONS`

Signed-off-by: Daniel Herzig <d.herzig@proxmox.com>
---
+ Thanks @Mira for the offline input!

 PVE/API2/Tasks.pm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/PVE/API2/Tasks.pm b/PVE/API2/Tasks.pm
index d65663f6..21d8fe31 100644
--- a/PVE/API2/Tasks.pm
+++ b/PVE/API2/Tasks.pm
@@ -122,11 +122,11 @@ __PACKAGE__->register_method({
                 node => { type => 'string', title => 'Node' },
                 pid => { type => 'integer', title => 'PID' },
                 pstart => { type => 'integer' },
-                starttime => { type => 'integer', title => 'Starttime' },
+                starttime => { type => 'integer', title => 'Starttime', renderer => 'timestamp' },
                 type => { type => 'string', title => 'Type' },
                 id => { type => 'string', title => 'ID' },
                 user => { type => 'string', title => 'User' },
-                endtime => { type => 'integer', optional => 1, title => 'Endtime' },
+                endtime => { type => 'integer', optional => 1, title => 'Endtime', renderer => 'timestamp' },
                 status => { type => 'string', optional => 1, title => 'Status' },
             },
         },
-- 
2.47.3


_______________________________________________
pve-devel mailing list
pve-devel@lists.proxmox.com
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-11-25 16:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-25 15:59 [pve-devel] ["PATCH pve-manager"] fix #7081: api: render start- and endtime as timestamps Daniel Herzig
2025-11-25 16:26 ` [pve-devel] applied: " Thomas Lamprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal