It's useful to know that NetApp OCI uses Unix Time Date.
A good example of this is when you're in the REST API trying to acquire audit information from:
/rest/v1/admin/audits
And there's two inputs:
fromTime : Filter for time range, from time in milliseconds
toTime: Filter for time range, to time in milliseconds
Q: So, what is Unix Time Date?
Unix Time Date is the number of seconds since 00:00:00 UTC on Jan 01 1970.
The Unix epoch is the time 00:00:00 UTC on 1 January 1970.
Q: How do you get the current Unix Time?
This is a good link:
https://currentmillis.com/
An example for PowerShell:
[double](Get-Date -Date ((Get-Date).ToUniversalTime()) -UFormat %s)
Q: Unix Time now in milliseconds?
Just the above * 1000.
Q: Get a days worth of NetApp OCI audit information?
To get a days worth of NetApp OCI audit information, we can use the REST API at:
/rest/v1/admin/audits
toTime: Filter for time range, to time in milliseconds
Get the output of:
[double](Get-Date -Date ((Get-Date).ToUniversalTime()) -UFormat %s) * 1000
fromTime : Filter for time range, from time in milliseconds
The same as the above minus 1000*60*60*24 = 86'400'000
Image: Example using UNIX Date Time in Milliseconds
A good example of this is when you're in the REST API trying to acquire audit information from:
/rest/v1/admin/audits
And there's two inputs:
fromTime : Filter for time range, from time in milliseconds
toTime: Filter for time range, to time in milliseconds
Q: So, what is Unix Time Date?
Unix Time Date is the number of seconds since 00:00:00 UTC on Jan 01 1970.
The Unix epoch is the time 00:00:00 UTC on 1 January 1970.
Q: How do you get the current Unix Time?
This is a good link:
https://currentmillis.com/
An example for PowerShell:
[double](Get-Date -Date ((Get-Date).ToUniversalTime()) -UFormat %s)
Q: Unix Time now in milliseconds?
Just the above * 1000.
Q: Get a days worth of NetApp OCI audit information?
To get a days worth of NetApp OCI audit information, we can use the REST API at:
/rest/v1/admin/audits
toTime: Filter for time range, to time in milliseconds
Get the output of:
[double](Get-Date -Date ((Get-Date).ToUniversalTime()) -UFormat %s) * 1000
fromTime : Filter for time range, from time in milliseconds
The same as the above minus 1000*60*60*24 = 86'400'000
Image: Example using UNIX Date Time in Milliseconds
Comments
Post a Comment