certificates icon indicating copy to clipboard operation
certificates copied to clipboard

Add days, weeks and years to duration times

Open drexljo opened this issue 3 years ago • 4 comments
trafficstars

What would you like to be added

Make config options like 'minTLSCertDuration' capable of dealing with 'd' (days), 'w' (weeks) and 'y' (years).

Why this is needed

ATM the only options are minutes or hours, which prompts most people (even in the documentation) to resort to hours in the range of thousands just to get a certificate duration of 90 days (the LetsEncrypt standard). That is just plain unreadable.

drexljo avatar Mar 28 '22 11:03 drexljo

Or make that 'D', 'W', 'M' and 'Y', to have months too and not breaking minutes.

drexljo avatar Mar 28 '22 11:03 drexljo

At the moment we're these properties are backed by Golang's time.Duration, which does not support anything larger than hours. It would be possible to add other "durations", but might be difficult to support this in a consistent way, as we will need to convert to/from the different durations in that process we will lose the original string unless we store them twice.

maraino avatar Mar 28 '22 22:03 maraino

Is enhancing the duration module somehow an option then?

drexljo avatar Mar 29 '22 09:03 drexljo

https://www.youtube.com/watch?v=hj7LRuusFqo

tashian avatar Mar 30 '22 17:03 tashian