Hi ,
“name”: “AB_EPOCH_TIME_WIN32_Convert”,
** “type”: “dateFormat”,**
** “attributes”: {**
** “inputFormat”: “MM/dd/yyyy”,**
** “outputFormat”: “EPOCH_TIME_WIN32”**
** },**
** “internal”: false**
I have used above code to update AccountExpires in AD.Some how it is showing one day before date
Example : i have given in CSV 12/30/2024,Im getting in AD 12/29/2024 07:00:00 PM
I wanted to populate same date with 12:00:00 PM
Any help is much appreciated
Thank you,
Saikumar
sharvari
(Sharvari Shah)
June 12, 2023, 12:16pm
2
You will have to add hours in your transform to have date with 12:00 pm timestamp.
Please refer this discussion - How to set accountexpires value on Active Directory - Compass
1 Like
Thank you for reply @sharvari
I tried adding hours in my transform and tested getting some exception.
Transform:
{
"id": "430429fa-d422-4843-9adb-4cd767ae443f",
"name": "Date Format Transform Anti End Date",
"type": "dateFormat",
"attributes": {
"input": {
"attributes": {
"expression": "-4h",
"roundUp": true
},
"type": "dateMath"
},
"inputFormat": "MM-dd-yyyy",
"outputFormat": "EPOCH_TIME_WIN32"
},
"internal": false
}
Exception :
trackingId: 3f602e6d502241d0ac71018932cb8cdc sailpoint.api.AttributePromotionException: Applying transform for attribute [anticipatedenddatewin32] failed
Can you check is something wrong my transform ?
Thanks,
Saikumar
sharvari
(Sharvari Shah)
June 12, 2023, 1:13pm
4
Its probably an issue with your date formatting.
For dateMath - The input datetime value must always be in ISO8601 format , in UTC time zone.
The output format for the DateMath transform is “yyyy-MM-dd’T’HH:mm”. When you use this transform inside another transform (e.g., dateFormat or dateCompare ), make sure to convert to ISO8601 first.
Reference:
Hope this helps solve your issue.
1 Like
Sharvari Shah:
C time zone.
Hi Sharvari,
I have tried ,Still we are facing same issue and we are using MM/DD/YYYY format in CSV file.
Please find below transform for ref .
{
"name": "Date Working",
"type": "firstValid",
"attributes": {
"values": [
{
"type": "dateFormat",
"attributes": {
"input": {
"attributes": {
"expression": "+4h",
"input": {
"attributes": {
"input": {
"attributes": {
"attributeName": "AnticipatedEndDate",
"sourceName": "SKS-Sandbox"
},
"type": "accountAttribute"
},
"inputFormat": "MM/dd/yyyy",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
},
"roundUp": true
},
"type": "dateMath"
},
"inputFormat": "yyyy-MM-dd'T'HH:mm",
"outputFormat": "EPOCH_TIME_WIN32"
},
"internal": false
},
{
"attributes": {
"value": "9223372036854775807"
},
"type": "static"
}
]
},
"internal": false
}
We are getting correct time but we have observed that time lag of one hour due to Day light saving wrt TerminationDate, Is it possible to set correct time like sailpoint even in day light saving ?
In Normal time we are getting correct time .
Thank you,
Saikumar
sharvari
(Sharvari Shah)
June 22, 2023, 11:10am
6
Check your VA cluster timezone and if required you can update it to reflect the applicable gmtOffset.
To check your VA cluster timezone you can use API:
Additional Reference:
By default, all IdentityNow sites, also known as orgs, have an org time zone set to CST/CDT. This org time zone affects a number of system internal task schedules that run regularly, such as the periodic nightly refresh. For more on time zones, see...
My cluster Time zone gmtOffset is -6 , But we need to add + hours.
Do we need to update it in Cluster ?
Does the configuration change can make on daylight savings , I’m getting only one hour difference in daylight savings
1 Like
cassidiopia
(Nicholas Bowerman)
June 22, 2023, 7:01pm
8
@saikumar39 The cluster time zone is currently a static value of gmtOffset and therefore doesn’t change with daylight savings. It must be updated if you want to maintain consistent processing throughout the year.
Or we could do away with daylight savings time and save a lot of administrators the hassle.
hreimert
(Hein Reimert)
June 25, 2023, 11:16pm
9
I agree with @sharvari - this would be a good option.
sharvari
(Sharvari Shah)
July 4, 2023, 2:12pm
10
Please check if this works for you.
{
"name": "Account Expires Date",
"type": "firstValid",
"attributes": {
"values": [
{
"type": "dateFormat",
"attributes": {
"input": {
"attributes": {
"input": {
"attributes": {
"value": "07/04/2023"
},
"type": "static"
},
"inputFormat": "MM/dd/yyyy",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
},
"inputFormat": "yyyy-MM-dd'T'HH:mm",
"outputFormat": "EPOCH_TIME_WIN32"
}
},
{
"attributes": {
"value": "9223372036854775807"
},
"type": "static"
}
]
},
"internal": false
}
I get output as 133329024000000000
Hein Reimert:
be a goo
Hi @sharvari ,
We have used same code, working as expected but in AD it is it is showing 4 hours back and from (Nov- March) Day light saving 5 hours back showing.
So we have added 4+ hours in transform and getting correctly in AD but (Nov- March) Day light saving we are getting one hour lag.
I wanted to achieve this through transform.
Please find screenshots for ref.
Thank you,
Saikumar
RAKGDS
(Rakesh Bhati)
July 5, 2023, 6:38am
12
This is related to the Daylight saying not supported on the VA. This needs to be handled programmatically in the transform.
hi @rakesh_bhati ,
Thank you for reply.
Can i have any sample transform or rule to achieve this scenario ?
Thanks,
Saikumar
sharvari
(Sharvari Shah)
July 5, 2023, 1:03pm
14
This isn’t the best way to do it as DST changes mid month and dates each year are different but maybe a workaround until there is support for Daylight time saving adjustments.
{
"name": "Account Expires Date",
"type": "firstValid",
"attributes": {
"values": [
{
"attributes": {
"time" : {
"attributes": {
"month": {
"attributes": {
"input": {
"attributes": {
"value": "07/04/2023"
},
"type": "static"
},
"delimiter": "/",
"index": "0"
},
"type": "split"
},
"value": "if($month == '11' || $month == '12' || $month == '01' || $month == '1' || $month == '02' || $month == '2' || $month == '03' || $month == '3')DST#{else}NO-DST#end"
},
"type": "static"
},
"defaultDate": {
"type": "dateFormat",
"attributes": {
"input": {
"attributes": {
"expression": "+4h",
"input": {
"attributes": {
"input": {
"attributes": {
"value": "07/04/2023"
},
"type": "static"
},
"inputFormat": "MM/dd/yyyy",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
}
},
"type": "dateMath"
},
"inputFormat": "yyyy-MM-dd'T'HH:mm",
"outputFormat": "EPOCH_TIME_WIN32"
}
},
"dstDate": {
"type": "dateFormat",
"attributes": {
"input": {
"attributes": {
"expression": "+5h",
"input": {
"attributes": {
"input": {
"attributes": {
"value": "07/04/2023"
},
"type": "static"
},
"inputFormat": "MM/dd/yyyy",
"outputFormat": "ISO8601"
},
"type": "dateFormat"
}
},
"type": "dateMath"
},
"inputFormat": "yyyy-MM-dd'T'HH:mm",
"outputFormat": "EPOCH_TIME_WIN32"
}
},
"value": "#if($time == 'DST')$dstDate#{else}$defaultDate#end"
},
"type": "static"
},
{
"attributes": {
"value": "9223372036854775807"
},
"type": "static"
}
]
},
"internal": false
}
I would suggest instead of this update your gmtOffset on VA before and after DST starts and end, to keep all scheduled aggregations and jobs, provisioning in sync with timezone.
1 Like
my 2 cents:
In such case where I need to check if the string is equal to one of many options I do something like this:
"dstMonths":"|11|12|01|1|02|2|03|3|",
"value": "#if($dstMonths.indexOf(\"|$month|\") >= 0)DST#{else}NO-DST#end"
I use |
(or any other character that is not present in any of the options) on both sides of the string to be checked to avoid partial match
1 Like
system
(system)
Closed
September 3, 2023, 7:11pm
16
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.