public inbox for pve-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Daniel Herzig <d.herzig@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] ["PATCH pve-manager"] fix #7081: api: render start- and endtime as timestamps
Date: Tue, 25 Nov 2025 16:59:11 +0100	[thread overview]
Message-ID: <20251125155911.591123-1-d.herzig@proxmox.com> (raw)

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


             reply	other threads:[~2025-11-25 15:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-25 15:59 Daniel Herzig [this message]
2025-11-25 16:26 ` [pve-devel] applied: " Thomas Lamprecht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20251125155911.591123-1-d.herzig@proxmox.com \
    --to=d.herzig@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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