How to add +10 hours to "NOW" variable

Hi Folks,

I have a situation where if user’s end date is “Today“, they are refreshed for their lifecyclestate the next date, not on the same date. Even though we have “requiresperiodicrefresh=true” in transform calculating lifecyclestate. Sailpoint support said to add +10Hrs to the logic when you are calculating “now” during date compare. Something like below but still failing with error “Errors An unexpected error occurred: Text ‘now’ could not be parsed at index 0“

What’s the best way to add +10Hrs to match with our timezone so user processed on same date as their actual End date.

Transform calculating the date with ‘now’:

“postTermUser07”: {
“attributes”: {
“secondDate”: {
“attributes”: {
“input”: {
“attributes”: {
“expression”: “+07d”,
“input”: {
“attributes”: {
“input”: {
“attributes”: {
“id”: “Generate TerminationDate”
},
“type”: “rule”
},
“inputFormat”: “yyyy-MM-dd”,
“outputFormat”: “ISO8601”
},
“type”: “dateFormat”
},
“requiresPeriodicRefresh”: true,
“roundUp”: false
},
“type”: “dateMath”
},
“inputFormat”: “yyyy-MM-dd’T’HH:mm”,
“outputFormat”: “ISO8601”
},
“type”: “dateFormat”
},
“firstDate”: {
“attributes”: {
“expression”: “+10h”, ←── This adds 10 hours to now (for GMT+10)
“input”: “now”,
“requiresPeriodicRefresh”: true,
“roundUp”: false
},
“type”: “dateMath”
},
“inputFormat”: “yyyy-MM-dd’T’HH:mm”,
“outputFormat”: “ISO8601”,
“negativeCondition”: “False”,
“operator”: “lte”,
“positiveCondition”: “True”
},
“type”: “dateCompare”
}

Current Existing code is :


–last part, rest is same—-

},
“negativeCondition”: “False”,
“operator”: “lte”,
“positiveCondition”: “True”,
“firstDate”: “now”
},

@msingh39

Please find a below sample transform hope it helps

 {
       
        "name": "plus6mon",
        "type": "dateCompare",
        "attributes": {
            "negativeCondition": "FALSE",
            "positiveCondition": "TRUE",
            "firstDate": {
                "attributes": {
                    "input": {
                        "attributes": {
                            "input": {
                                "attributes": {
                                    "values": [
                                        {
                                            "attributes": {
                                                "input": {
                                                    "attributes": {
                                                        "name": "endDate"
                                                    },
                                                    "type": "identityAttribute"
                                                },
                                                "end": 10.0,
                                                "begin": 0.0
                                            },
                                            "type": "substring"
                                        },
                                        "2999-12-31"
                                    ]
                                },
                                "type": "firstValid"
                            },
                            "inputFormat": "yyyy-MM-dd",
                            "outputFormat": "ISO8601"
                        },
                        "type": "dateFormat"
                    },
                    "expression": "+170d",
                    "roundUp": true
                },
                "type": "dateMath"
            },
            "operator": "LT",
            "secondDate": "now"
        },
        "internal": false
    }

Thanks. I see it is calculating & adding 6month date. But I want to add 10hours to match the GMT+10 for our region.

Since NOW is in UTC time, I need to add additional 10hours to it so it matches/checked with the exact time zone value.

@msingh39 you can change that to 10h

Thanks tried it but still the same. It’s not calculating as expected.