<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Hi Gustav,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
Many thanks. Two follow-up questions, if I may...</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);">
<ul>
<li><span style="color: rgb(0, 0, 0); font-family: Calibri, Helvetica, sans-serif; font-size: 11pt; background: var(--white);">Does the administrative status need to be worked out in the code or will Midpoint do this all by itself? Based on your code it successfully
imports start_date and end_date from the Postgres table and leaves the administrativeStatus as "undefined" (which, according to the balloon help seems to be what I want - Midpoint takes care of determining if the account should be active or not), and</span><br>
</li><li>Can the date display format be set to UK (dd-MM-yyyy) rather than US (MM-dd-yyyy)<br>
</li></ul>
</div>
<div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> midPoint <midpoint-bounces@lists.evolveum.com> on behalf of Pálos Gustáv <gustav.palos@gmail.com><br>
<b>Sent:</b> 17 April 2020 07:53<br>
<b>To:</b> midPoint General Discussion <midpoint@lists.evolveum.com><br>
<b>Subject:</b> Re: [midPoint] Idiot question concerning date/time handling</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div>Hi Kevin,</div>
<div><br>
</div>
<div>yes you need to convert it, like this:</div>
<div><expression><br>
<script><br>
<code>basic.parseDateTime("yyyy-MM-dd HH:mm:ss", "2020-04-17 07:00:00")</code><br>
</script><br>
</expression><br>
</div>
<div><br>
</div>
Best regards,
<div><br>
</div>
<div>Gustav</div>
<div><br>
</div>
<div><br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">pi 17. 4. 2020 o 8:18 Collins, Kevin <<a href="mailto:K.J.Collins@hw.ac.uk">K.J.Collins@hw.ac.uk</a>> napísal(a):<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
Hi everyone,</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
I hope that everyone is well and coping with the new working patterns that many of us have had to adopt.</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
I have a question that may have been answered previously, but I can't find it. </div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
The "source of truth" for user data is in a Postgresql table with start_date and end_date supplied. The columns for start_date and end_date are defined in the table as "timestamp without timezone" and take the form "yyyy-MM-dd HH:mm:ss", (example "2020-04-17
07:00:00"). </div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
I'm trying to set up activation for any users coming in from this data feed so that Midpoint knows when it's time to create, activate, suspend or archive the user account. I have got the MidPoint database table connector connecting to the database and can import
some attributes. However, I can't get the start_date into validFrom and end_date into validTo. </div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
=-=-=-=-=-=-=-=</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
</div>
<div style="color:rgb(212,212,212); background-color:rgb(30,30,30); font-family:Menlo,Monaco,"Courier New",monospace; font-size:12px; line-height:18px">
<div><span style="color:rgb(128,128,128)"><</span><span style="color:rgb(86,156,214)">activation</span><span style="color:rgb(128,128,128)">></span></div>
<div><span> </span><span style="color:rgb(128,128,128)"><</span><span style="color:rgb(86,156,214)">validFrom</span><span style="color:rgb(128,128,128)">></span></div>
<div><span> </span><span style="color:rgb(128,128,128)"><</span><span style="color:rgb(86,156,214)">inbound</span><span style="color:rgb(128,128,128)">></span></div>
<div><span> </span><span style="color:rgb(128,128,128)"><</span><span style="color:rgb(86,156,214)">authoritative</span><span style="color:rgb(128,128,128)">></span><span>true</span><span style="color:rgb(128,128,128)"></</span><span style="color:rgb(86,156,214)">authoritative</span><span style="color:rgb(128,128,128)">></span></div>
<div><span> </span><span style="color:rgb(128,128,128)"><</span><span style="color:rgb(86,156,214)">exclusive</span><span style="color:rgb(128,128,128)">></span><span>false</span><span style="color:rgb(128,128,128)"></</span><span style="color:rgb(86,156,214)">exclusive</span><span style="color:rgb(128,128,128)">></span></div>
<div><span> </span><span style="color:rgb(128,128,128)"><</span><span style="color:rgb(86,156,214)">strength</span><span style="color:rgb(128,128,128)">></span><span>normal</span><span style="color:rgb(128,128,128)"></</span><span style="color:rgb(86,156,214)">strength</span><span style="color:rgb(128,128,128)">></span></div>
<div><span> </span><span style="color:rgb(128,128,128)"><</span><span style="color:rgb(86,156,214)">source</span><span style="color:rgb(128,128,128)">></span></div>
<div><span> </span><span style="color:rgb(128,128,128)"><</span><span style="color:rgb(86,156,214)">c:path</span><span style="color:rgb(128,128,128)">></span><span>$account/attributes/start_date</span><span style="color:rgb(128,128,128)"></</span><span style="color:rgb(86,156,214)">c:path</span><span style="color:rgb(128,128,128)">></span></div>
<div><span> </span><span style="color:rgb(128,128,128)"></</span><span style="color:rgb(86,156,214)">source</span><span style="color:rgb(128,128,128)">></span></div>
<div><span> </span><span style="color:rgb(128,128,128)"><</span><span style="color:rgb(86,156,214)">target</span><span style="color:rgb(128,128,128)">></span></div>
<div><span> </span><span style="color:rgb(128,128,128)"><</span><span style="color:rgb(86,156,214)">c:path</span><span style="color:rgb(128,128,128)">></span><span>$focus/activation/validFrom</span><span style="color:rgb(128,128,128)"></</span><span style="color:rgb(86,156,214)">c:path</span><span style="color:rgb(128,128,128)">></span></div>
<div><span> </span><span style="color:rgb(128,128,128)"></</span><span style="color:rgb(86,156,214)">target</span><span style="color:rgb(128,128,128)">></span></div>
<div><span> </span><span style="color:rgb(128,128,128)"></</span><span style="color:rgb(86,156,214)">inbound</span><span style="color:rgb(128,128,128)">></span></div>
<div><span> </span><span style="color:rgb(128,128,128)"></</span><span style="color:rgb(86,156,214)">validFrom</span><span style="color:rgb(128,128,128)">></span></div>
<div><span> </span><span style="color:rgb(128,128,128)"><</span><span style="color:rgb(86,156,214)">validTo</span><span style="color:rgb(128,128,128)">></span></div>
<div><span> </span><span style="color:rgb(128,128,128)"><</span><span style="color:rgb(86,156,214)">inbound</span><span style="color:rgb(128,128,128)">></span></div>
<div><span> </span><span style="color:rgb(128,128,128)"><</span><span style="color:rgb(86,156,214)">authoritative</span><span style="color:rgb(128,128,128)">></span><span>true</span><span style="color:rgb(128,128,128)"></</span><span style="color:rgb(86,156,214)">authoritative</span><span style="color:rgb(128,128,128)">></span></div>
<div><span> </span><span style="color:rgb(128,128,128)"><</span><span style="color:rgb(86,156,214)">exclusive</span><span style="color:rgb(128,128,128)">></span><span>false</span><span style="color:rgb(128,128,128)"></</span><span style="color:rgb(86,156,214)">exclusive</span><span style="color:rgb(128,128,128)">></span></div>
<div><span> </span><span style="color:rgb(128,128,128)"><</span><span style="color:rgb(86,156,214)">strength</span><span style="color:rgb(128,128,128)">></span><span>normal</span><span style="color:rgb(128,128,128)"></</span><span style="color:rgb(86,156,214)">strength</span><span style="color:rgb(128,128,128)">></span></div>
<div><span> </span><span style="color:rgb(128,128,128)"><</span><span style="color:rgb(86,156,214)">source</span><span style="color:rgb(128,128,128)">></span></div>
<div><span> </span><span style="color:rgb(128,128,128)"><</span><span style="color:rgb(86,156,214)">c:path</span><span style="color:rgb(128,128,128)">></span><span>$account/attributes/end_date</span><span style="color:rgb(128,128,128)"></</span><span style="color:rgb(86,156,214)">c:path</span><span style="color:rgb(128,128,128)">></span></div>
<div><span> </span><span style="color:rgb(128,128,128)"></</span><span style="color:rgb(86,156,214)">source</span><span style="color:rgb(128,128,128)">></span></div>
<div><span> </span><span style="color:rgb(128,128,128)"><</span><span style="color:rgb(86,156,214)">target</span><span style="color:rgb(128,128,128)">></span></div>
<div><span> </span><span style="color:rgb(128,128,128)"><</span><span style="color:rgb(86,156,214)">c:path</span><span style="color:rgb(128,128,128)">></span><span>$focus/activation/validTo</span><span style="color:rgb(128,128,128)"></</span><span style="color:rgb(86,156,214)">c:path</span><span style="color:rgb(128,128,128)">></span></div>
<div><span> </span><span style="color:rgb(128,128,128)"></</span><span style="color:rgb(86,156,214)">target</span><span style="color:rgb(128,128,128)">></span></div>
<div><span> </span><span style="color:rgb(128,128,128)"></</span><span style="color:rgb(86,156,214)">inbound</span><span style="color:rgb(128,128,128)">></span></div>
<div><span> </span><span style="color:rgb(128,128,128)"></</span><span style="color:rgb(86,156,214)">validTo</span><span style="color:rgb(128,128,128)">></span></div>
<div><span> </span><span style="color:rgb(128,128,128)"></</span><span style="color:rgb(86,156,214)">activation</span><span style="color:rgb(128,128,128)">></span></div>
<br>
</div>
<br>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
=-=-=-=-=-=-=-=</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
(And I haven't got a clue - yet!! - as to how to determine the administrative status from these dates. I think that it should be "undefined" to allow Midpoint to make the decision).</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
Do I have to convert the dates from Postgresql's timestamp-without-timezone into something else?</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
Help would be appreciated with this PoC.</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
Stay safe, stay well !!</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
Regards,</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
<br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
-Kev_C</div>
<div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt; color:rgb(0,0,0)">
<br>
</div>
<div id="x_gmail-m_-8867464548730453114Signature">
<div id="x_gmail-m_-8867464548730453114divtagdefaultwrapper" dir="ltr" style="font-size:10pt; color:rgb(0,0,0); background-color:rgb(255,255,255); font-family:Calibri,Arial,Helvetica,sans-serif">
<div name="x_divtagdefaultwrapper">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px">
<div style="font-family:Tahoma; font-size:13px"><font color="808080"><br>
-- <br>
Kevin Collins,<br>
Edinburgh,<br>
Scotland, UK<br>
</font><br>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<u></u>
<div align="center">
<hr size="2" width="100%" align="center">
</div>
<p style="font-family:Arial,"Helvetica Neue",Helvetica,sans-serif; font-size:8pt; margin:0px">
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:</p>
<ol style="margin:0px">
<li style="font-family:Arial,"Helvetica Neue",Helvetica,sans-serif; font-size:8pt">
Heriot-Watt University, a Scottish charity registered under number SC000278</li><li style="font-family:Arial,"Helvetica Neue",Helvetica,sans-serif; font-size:8pt">
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.</li></ol>
<p style="font-family:Arial,"Helvetica Neue",Helvetica,sans-serif; font-size:8pt; margin:0px">
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.</p>
</div>
_______________________________________________<br>
midPoint mailing list<br>
<a href="mailto:midPoint@lists.evolveum.com" target="_blank">midPoint@lists.evolveum.com</a><br>
<a href="https://lists.evolveum.com/mailman/listinfo/midpoint" rel="noreferrer" target="_blank">https://lists.evolveum.com/mailman/listinfo/midpoint</a><br>
</blockquote>
</div>
<br clear="all">
<div><br>
</div>
-- <br>
<div dir="ltr" class="x_gmail_signature">s pozdravom
<div><br>
</div>
<div>Gustáv Pálos</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>