Text Driver - How to save birthdate into eDirectory time attribute using conver time funcion

Hi

We have a custom attribute to save the birthdate, but when we use the Conver Time function and set the detinarion format to "Number of second since midnigth, January1, 1970 CTIME" and the date < 1970 then save the incorrect date.

Only work if the date is > 1970.

      

Exist other format supported for edirectory time attributo to work with date < 1970?

Best,

  • Suggested Answer

    0

    Hey, see the discussion in my post from 6 months ago. In short, go to the driver's ECV and change the dirxml.engine.interpreter-time-signed property.

    You can find some more details in the post working with date with negative value 

  • 0 in reply to 

    Hi Milan.

    I have set to true the ECV

    But, dont work.

    If I save 01/01/1960 from text driver, in eDir show:

  • 0 in reply to 

    Can you past an extract of the driver's trace here? ...the part where you convert the time...

    And a stupid question... Have you restarted the driver? :) 

  • 0 in reply to 

    Hi Milan.

    Extract from driver log file.
    Data from text file
    -----------------------------------------------------

    <delimited-text>
        <record>
          <field name="CN">T91</field>
          <field name="workforceID">13586091</field>
          <field name="Given Name">Pedro</field>
          <field name="Surname">Perez</field>
          <field name="Full Name">Pedro E. Perez C.</field>
          <field name="employeeStatus">A</field>
          <field name="jobCode">90101258</field>
          <field name="managerWorkforceID">13586005</field>
          <field name="vehicleInformation">T99</field>
          <field name="siteLocation">Caracas</field>
          <field name="Login Disabled">0</field>
          <field name="Internet EMail Address">pperez@seti.com.ve</field>
          <field name="company">Seti</field>
          <field name="Telephone Number">4123387768</field>
          <field name="isManager">0</field>
          <field name="CustFirstName">Pedro</field>
          <field name="CustSecondName">Eduardo</field>
          <field name="CustFirstSurname">Perez</field>
          <field name="CustSecondSurname">Cardenas</field>
          <field name="CustManagerName">Cesar</field>
          <field name="CustManagerName2">Augusto</field>
          <field name="CustManagerSurName">Morrone</field>
          <field name="CustManagerSurName2">Trevison</field>
          <field name="CustEmployeeType">Empleados</field>
          <field name="CustInitialDate">01/01/2020</field>
          <field name="CustBirthDate">29/01/1960</field>
          ...
          <field name="CustUserSSPRFlag">SSPR1</field>
      </record>
    </delimited-text>    


    Convertion section
    --------------------------------------
    [09/17/24 14:33:29.431]:MID-Text-MIG-USERS PT:      Action: do-set-dest-attr-value("CustBirthDate",class-name="CustUser",token-convert-time(dest-format="!CTIME",dest-lang="es-VE",dest-tz="UTC",offset="4",offset-unit="hour",src-format="dd/MM/yyyy",src-lang="es-VE",src-tz="UTC",token-op-attr("CustBirthDate"))).
    [09/17/24 14:33:29.431]:MID-Text-MIG-USERS PT:        arg-string(token-convert-time(dest-format="!CTIME",dest-lang="es-VE",dest-tz="UTC",offset="4",offset-unit="hour",src-format="dd/MM/yyyy",src-lang="es-VE",src-tz="UTC",token-op-attr("CustBirthDate")))
    [09/17/24 14:33:29.431]:MID-Text-MIG-USERS PT:          token-convert-time(dest-format="!CTIME",dest-lang="es-VE",dest-tz="UTC",offset="4",offset-unit="hour",src-format="dd/MM/yyyy",src-lang="es-VE",src-tz="UTC",token-op-attr("CustBirthDate"))
    [09/17/24 14:33:29.432]:MID-Text-MIG-USERS PT:            token-convert-time(dest-format="!CTIME",dest-lang="es-VE",dest-tz="UTC",offset="4",offset-unit="hour",src-format="dd/MM/yyyy",src-lang="es-VE",src-tz="UTC",token-op-attr("CustBirthDate"))
    [09/17/24 14:33:29.432]:MID-Text-MIG-USERS PT:              token-op-attr("CustBirthDate")
    [09/17/24 14:33:29.432]:MID-Text-MIG-USERS PT:                Token Value: "29/01/1960".
    [09/17/24 14:33:29.432]:MID-Text-MIG-USERS PT:              Arg Value: "29/01/1960".
    [09/17/24 14:33:29.432]:MID-Text-MIG-USERS PT:            Token Value: "-313185600".
    [09/17/24 14:33:29.432]:MID-Text-MIG-USERS PT:          Arg Value: "-313185600".
    set value to attr
    -------------------------------------------------
    <add-attr attr-name="CustBirthDate">
    <value type="string">29/01/1960</value>
    </add-attr>
    ...
    <modify-attr attr-name="CustBirthDate">
    <remove-all-values/>
    <add-value>
      <value type="string">-313185600</value>
    </add-value>
    </modify-attr>

    Yes, I restarted the driver many times

    Regards

  • 0   in reply to 

    I think the year 1960 is the same (8-bit) value as 2096. The problem is how this value is interpreted by the program that looks at it. So in the case of IdentityConsole, it probably interprets the integer as unsigned meaning it has an option for 1970 and more turned on.

    That setting is actually for the driver fetching data IDV to know if this data should be interpreted as signed or unsigned. So actually if you fetched the same attribute with this driver the value should change when you change that setting.

  • 0   in reply to   

    There is an Time64 syntax in eDirectory for the same reason, that will allow you to store dates before or after these two dates.

    Another way (which is the one which also have been suggested in the past) is to store "complicated" dates in a string syntax.That way you'll not run into this problem.

  • 0 in reply to   

    HI 

    We chose to convert the date attribute to string and it is working without problems.

    Thanks for idea.