-
Notifications
You must be signed in to change notification settings - Fork 354
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
Allow to access the datatime object in epn #7333
base: master
Are you sure you want to change the base?
Conversation
Please see https://www.freeipa.org/page/Contribute/Code on PR requirements. The text of the commit doesn't match the content (this has nothing to do with i18n). Will that strptime work? I think the value will be like 20240724200619Z The time delta is going to display oddly, like: 3:59:59.999997 |
The title explain the modification: we provide the datetime object in variable for template. Thus in template we can do expiration_datetime.strfmt("with my native language").
Yes it can parse date from FreeIPA server. I intended to let user format as their wish. I could Have added another setting with the python format.
In template we can do .days or a formatting function.
Sorry, I just opened to not lost my change. I will clean later. |
0216a60
to
e32de37
Compare
I have updated my (comment)[https://www.freeipa.org/page/Contribute/Code#create-pull-request-on-github] and think it will better describe why this change should be merged.
I saw I was duplicating code that was just below so I simply moved the code upwards and kept the format (this code was already merged so yes it will work or we have a bug)
I expect user to use
|
The CI error is not be related with my change:
|
Please update the man page with the new directives. Be sure to mention that they are python objects and not strings. |
…late We have internationals users and we want to format in their native language. Here we pass the raw datimeobject and user can now use strftime in jinja template to format depending on user language. This PR helps in situation where their is one instance of IPA by country one node in country X can be configured with a date format X and node in country Y can be confiugred with a date format Y. Maybe a more general solution is to add a country attribute and make it visibile to template so it can dynamically switch used template per user in the single node case. No related issue opened.
We have internationals users and we want to format in their native language.