[midPoint] Adding days/hours/minutes to validTo in midpoint and date/time formatting in the UI

Fabian Noll-Dukiewicz fabian.noll-dukiewicz at fndit.de
Fri Nov 18 13:40:27 CET 2022


Hi Kevin,

the first point can be solved easily via script:
​
basic.parseDateTime("yyyy-MM-dd'T'HH:mm:ss", validTo + "T23:59:59");

In this example "valdTo" is the input value.

The second point is also simple. The representation of date, currencies and other values depends on the attribute "locale".
If I use german the date is shown like this "01.01.2023 (DD.MM.YYYY)". If I use english, the date is shown like this "11/18/2022 (MM/DD/YYYY)".

Good luck!
Fabian

--

Fabian Noll-Dukiewicz

Spezialist Identity & Access Management | Geschäftsführer

Tel.: +49 152 244 63 211

Email: fabian.noll-dukiewicz at fndit.de<mailto:fabian.noll-dukiewicz at fndit.de>

Web: https://www.fndit.de<https://www.fndit.de/>

________________________________
Von: Collins, Kevin <K.J.Collins at hw.ac.uk>
Gesendet: Donnerstag, 17. November 2022 12:31
An: midpoint at lists.evolveum.com <midpoint at lists.evolveum.com>
Betreff: [midPoint] Adding days/hours/minutes to validTo in midpoint and date/time formatting in the UI

Hi everyone,


I've got stuck again in putting together a midpoint proof-of-concept and
I would really appreciate some help.

The problem is this. Inbound data from HR to the IDM might contain an
end_date. If the end_date is null or empty the user has not indicated
that they are leaving. If the end_date has a value then that value is a
date in the form 'yyyy-MM-dd' and is the person's last working day.
If I map this to $focus/activation/validTo in schemaHandling in the
resource the value goes in without complaint and shows up in
midpoint/User/activation. MidPoint, though, assumes a date of 12:00AM
and so would disable the user account at the _start_ of the working day
rather than at the end.  How can I add 23h59m onto the end_date so that
the departing user still has access on their last day?

Second issue I'm having, since I've been poking about in dates/times...
Is it possible to make dates/times in midPoint show dates and times in
UK English form (dd/MM/yyyy) rather than the US format (MM/dd/yyyy) and,
similarly to have times show in 24-hour clock form rather than 12-hour
with AM/PM indication?

Thanks in advance for any help you can give me.


-Kev_C


--
Kevin Collins
EDINBURGH, EH14 4AS,
Scotland, UK
________________________________

Founded in 1821, Heriot-Watt is a leader in ideas and solutions. With campuses and students across the entire globe we span the world, delivering innovation and educational excellence in business, engineering, design and the physical, social and life sciences. This email is generated from the Heriot-Watt University Group, which includes:

  1.  Heriot-Watt University, a Scottish charity registered under number SC000278
  2.  Heriot- Watt Services Limited (Oriam), Scotland's national performance centre for sport. Heriot-Watt Services Limited is a private limited company registered is Scotland with registered number SC271030 and registered office at Research & Enterprise Services Heriot-Watt University, Riccarton, Edinburgh, EH14 4AS.

The contents (including any attachments) are confidential. If you are not the intended recipient of this e-mail, any disclosure, copying, distribution or use of its contents is strictly prohibited, and you should please notify the sender immediately and then delete it (including any attachments) from your system.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.evolveum.com/pipermail/midpoint/attachments/20221118/5ea96f39/attachment-0001.htm>


More information about the midPoint mailing list