pvesh snapshot snaptime syntax/format

Jan 16, 2020
16
0
21
28
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:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!