Article

mbluteau's picture
article
Reads:

3624

Score:
0
0
 
Comments:

0

Date Conversion Rule for Policy Builder

Author Info

18 July 2007 - 4:35am
Submitted by: mbluteau

(View Disclaimer)

Note: This tip is a follow-up to Martyn Durrant's Cool Solution Getting the Current Time into the UserApp Flow.

Here is an example on how to convert the date/time from YYYYMMDD12000000+ZONE to eDirectory format (e.g., 1167627600) in Policy Builder, for the date only:

<rule>
  <description>RBAC</description>
  <conditions>
    <and>
      <if-op-attr name="rbac-delegateStartDateString" op="available"/>
    </and>
  </conditions>
  <actions>
    <do-set-src-attr-value name="rbac-delegateStartDate">
      <arg-value type="string">
        <token-convert-time dest-format="!CTIME" dest-tz="America/New_York" 
src-format="yyyyMMdd" src-tz="America/New_York">
          <token-substring length="8">
          <token-op-attr name="rbac-delegateStartDateString"/>
          </token-substring>
        </token-convert-time>
      </arg-value>
    </do-set-src-attr-value>
  </actions>
</rule>


Disclaimer: As with everything else at Cool Solutions, this content is definitely not supported by Novell (so don't even think of calling Support if you try something and it blows up).

It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test, test, test before you do anything drastic with it.




User Comments

© 2013 Novell