I know there are a lot of questions out there how to deal with the differing time zone aspects (Adaxes Admin servers and Initiator locations, etc...) and the respective ways to adjust and handle

For example, using a custom attribute that pivots off of different OU's or some other logic to adequately adjust.

However, I assume this isn't possible yet. But I wondered if capturing the time as it relates to an initiator in the admin site so that logic could then pivot off of that.

More specifically, in a custom command date/time picker parameter, the end value is the time adjusted for the server's time zone. Which, is still useful. Would it be possible as an enhancement request to start capturing the time/date value as it relates to what the initiator sees? So like "datetimeraw-parameter" or something to that effect.

If it was possible to just start capturing the raw value without Adaxes even having to consider any kind of time zone that would give admins a lot of flexibility to start reflecting time zone adjustments accordingly and dynamically.

Does that make sense?

ago by (860 points)
ago by (306k points)
0

Hello,

Sorry for the confusion, but we are not sure what exactly you mean or need to achieve. Please, provide a live example of a full workflow that would use such a feature. Make sure to include specific dates and describe the difference in the current and the desired approach for them.

ago by (860 points)
0

Here is a working example:

  1. Initiator exists in EST
  2. Server exists in CST
  3. User/Emplyee in PST

If you want to schedule a deprovision for the user in PST, there is no native logic to handle that. So let's say we set up parameters to make it easier for operators to now have to do the mental math. That attribute holds EST, CST and PST as three timezones a user could be in.

The workflow would be as follows without any logic:

  1. Initiator schedules the deprovision for 5:00 PM PST (PST being a parameter)

  2. The datetimepicker attribute writes its value into a custom attribute (only way to hold the time to base the execution time off of...as far as I am aware). Since the server is in CST this now registers as 4:00 PM CST, this would trigger the execution 2:00 PM PST (three hours earlier than that initiator intended).

Currently I've built in a lot of logic and steps to account for 9 different scenarios and when it comes to notifications it gets trickier to reflect details in a relatable way to people in their time zones.

If you could just take the raw time value of what the initiator chooses you can steamline alot of this into far fewer steps and you can homognize messaging.

Happy to get on a call next week if that would be easier.

1 Answer

ago by (306k points)
0 votes

Hello,

Thank you for describing the workflow. For everything to work as you expect, you need to use the below script that will convert the date specified in the parameter according to time zones before saving to Adaxes custom attribute.

As for email notifications, you can use a value reference like %adm-CustomAttributeDate1,,,utc%. In this case, it will resolve into the date stored in the attribute in UTC time zone.

$parameterName = "param-DateParam" # TODO: modify me
$timeZoneIdInitiator = "Eastern Standard Time" # TODO: modify me
$timeZoneIdTargetObject = "Pacific Standard Time" # TODO: modify me

# Convert datetime to initiator time zone
$dateTime = $Context.Arguments.GetParameterValueAsIs($parameterName) 
try {
    $initiatorDateTime = [System.TimeZoneInfo]::ConvertTimeBySystemTimeZoneId($dateTime, $timeZoneIdInitiator)
} catch {
    $Context.LogMessage("Error: Time zone ID '$timeZoneIdInitiator' not found or invalid. Exception: " + $_.Exception.Message, "Error")
    return
}

# Get TimeZoneInfo for target object
try {
    $targetTimeZone = [System.TimeZoneInfo]::FindSystemTimeZoneById($timeZoneIdTargetObject)
} catch {
    $Context.LogMessage("Error: Time zone ID '$timeZoneIdTargetObject' not found or invalid. Exception: " + $_.Exception.Message, "Error")
    return
}

# Convert initiator datetime to target object time zone
$targetObjectDateTimeInUtc = [System.TimeZoneInfo]::ConvertTimeToUtc($initiatorDateTime, $targetTimeZone)

# Save date to custom attribute
$Context.TargetObject.Put("adm-CustomAttributeDate1", $targetObjectDateTimeInUtc)
$Context.TargetObject.SetInfo()

Thank you for the suggestion and provided details. We forwarded the lot to the corresponding department for consideration.

Related questions

Hello! I would like to use the utc parameter that is described in value references - date/time formatting (https://www.adaxes.com/help/ValueReferences/). The goal is ... please indicate whiich would be the right way for using the utc switch? Thanks, Fabiano

asked May 3, 2024 by fabiano.santos-agco (20 points)
0 votes
1 answer

Hello, I'm inserting a %datetime% value reference in the email notification action in a business rule. But the inserted time is UTC. How can I make it local time?

asked Jul 21, 2011 by sdd5533 (100 points)
0 votes
1 answer

Hi team, is it somehow possible to fetch and export information from scheduled tasks and rule based groups about their schedule time? Maybe also about the next run time and how ... an overview and see if some or too many tasks are running at the same time.

asked Mar 5 by wintec01 (2.3k points)
0 votes
1 answer

On the last working day of a user I should always lock (disable) his account at 5pm local time. Since our company is worldwide, I need a good idea how to easily find out when it is 5pm for this user (always local time). Is there a simple solution in adaxes ?

asked Jun 13, 2023 by Beat Ott (50 points)
0 votes
1 answer

Hello I have two questions about date field in the the web GUI. Is it possible to determine the first day of the week? In my case Monday should be the first day of ... allow change time". I have not found this in the web configurator. thx & regards pudong

asked Jul 8, 2022 by pudong (680 points)
+1 vote
1 answer