pvesh snapshot snaptime syntax/format

Duktek

Active Member
Jan 16, 2020
16
0
41
29
Hello,

We are currently developing a script to get the creation date of a snapshot from a VM using this command :

pvesh get "/nodes/$NODE/qemu/$VMID/snapshot" --output-format=json |jq .[].snaptime

But we cannot understand the syntax/format of the output :

1734579627
1734423758
1734423290

On the VM, there's 3 snapshots in which the 2 created on 17/12/2024 whereas the latest one is created today (19/12/2024).

Can someone explain the syntax of the snaptime output above? We already seen the documentation and it does not seem to explain the syntax very well :

https://pve.proxmox.com/pve-docs/api-viewer/index.html#/nodes/{node}/qemu/{vmid}/snapshot

Any help will be much appreciated.

Thanks in advance.


Best Regards,
Linux Team
 
The "date" command can convert "Unix-Time" to user readable:
Code:
$ for D in 1734579627 1734423758 1734423290; do date -d @$D; done
Do 19. Dez 04:40:27 CET 2024
Di 17. Dez 09:22:38 CET 2024
Di 17. Dez 09:14:50 CET 2024

$ for D in 1734579627 1734423758 1734423290; do date -d @$D -u; done
Do 19. Dez 03:40:27 UTC 2024
Di 17. Dez 08:22:38 UTC 2024
Di 17. Dez 08:14:50 UTC 2024
 
Last edited: