ovirt api snapshot date format?

I'm trying to use the ovirt REST api to read snapshot date but the number I'm getting back doesn't appear to be in epoch time. What format is it? Example: "date":1565299725928,"snapshot_status":"ok" Should be "Aug 8, 2019", epoch conversion put it at Tue May 16 16:25:28 51572. (accessed via https://$HOSTNAME/ovirt-engine/api/vms/$value/snapshots)

Hi Bill, I guess this is a Unix timestamp in milliseconds. I'm afraid that the description of Date primitives in API model document is incorrect. The "an integer containing the number of *seconds* since Jan 1st 1970, also know as *epoch time* <https://en.wikipedia.org/wiki/Unix_time>." should be changed to "an integer containing the number of *milliseconds* since Jan 1st 1970, also know as *epoch time* <https://en.wikipedia.org/wiki/Unix_time>." [1]: http://ovirt.github.io/ovirt-engine-api-model/4.4/#types/date Regards, Joey On Thu, Aug 29, 2019 at 6:40 AM Bill James <bill.james@j2.com> wrote:
I'm trying to use the ovirt REST api to read snapshot date but the number I'm getting back doesn't appear to be in epoch time. What format is it?
Example: "date":1565299725928,"snapshot_status":"ok"
Should be "Aug 8, 2019", epoch conversion put it at Tue May 16 16:25:28 51572.
(accessed via https://$HOSTNAME/ovirt-engine/api/vms/$value/snapshots)
_______________________________________________ Users mailing list -- users@ovirt.org To unsubscribe send an email to users-leave@ovirt.org Privacy Statement: https://www.ovirt.org/site/privacy-policy/ oVirt Code of Conduct: https://www.ovirt.org/community/about/community-guidelines/ List Archives: https://lists.ovirt.org/archives/list/users@ovirt.org/message/W6ED3NTRX45NED...
participants (2)
-
Bill James
-
Joey Ma