-
Notifications
You must be signed in to change notification settings - Fork 357
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FEATURE] Expire time as ISO 8601 #217
Comments
@snago Sorry to hear that asparagus doesn't do it for you! The issue here is deeper than this formula. It uses Salt's https://docs.saltstack.com/en/latest/ref/states/all/salt.states.user.html#salt.states.user.present
It wouldn't be a good idea to try to resolve this in the formula using even more Jinja than there already is: Lines 168 to 180 in 5e6846b
Your best bet is to file an issue in the main SaltStack repo and see what their response is. In the meantime, you could build upon an answer such as this one to use this expression to calculate a given date. So something like: $ expr $(date -d "2020-01-01" +%s) / 86400
18262 |
Ah, yes, you are right. It would be much better to fix this in I've opened saltstack/salt#55983. But looking at that jinja it looks like when/if that issue is fixed and |
@snago Excellent, hope that leads to a resolution and doesn't fall afoul of the dreaded
Now this might sound strange but our formulas don't benefit from upstream changes immediately. The problem is that we have to remain backwards compatible with all of the officially supported releases, so that goes back to We do test against the |
Is your feature request related to a problem?
As a human, looking at users pillars it is hard to see when they expire.
Describe the solution you'd like
Instead of this:
I would like to be able to have this:
Describe alternatives you've considered
Augment my brain with a chip that automatically can convert numbers I see from UNIX timestamp and insert the date and time as a memory. E.g. I would look at a UNIX timestamp and think of the first time that I ate asparagus and I would "remember" that it was 2020-07-12 at 10:00:00.
That would be much cooler, but it seems a lot harder.
Additional context
The text was updated successfully, but these errors were encountered: