Score:0

NetApp ONTAP certificate expiry_time format

th flag

I want to configure an expiration period of 5 years for a root CA certificate on NetApp ONTAP via its API.

The expiry_time is documented like this:

expiry_time

Certificate expiration time. Can be provided on POST if creating self-signed certificate. The expiration time range is between 1 day to 10 years.

An example for 365 days is P365DT. I am not aware of a format to specify time periods like this. Can someone tell me how this works? How do I specify 5 years in that format?

br flag
Do you not have support for this via NetApp themselves? If so drop them a line first.
Score:1
th flag

As a cheap workaround, you can of course calculate the number of days for 5 years and just use

P1825DT

as the expiry time period. But there is a name for that format and it also supports years. The format is defined in ISO 8601 and is used to describe durations.

The string always starts with P for period. It can then be followed by Years, Months, Weeks and/or Days. If you also want to specify Hours, Minutes and/or Seconds, append a T for time first and then add the desired values. Example for 5 years:

P5Y

Example for 8 years, 5 months, 20 days, 13 hours and 37 minutes:

P8Y5M20DT13H37M
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.