0 votes

Hi,

I have a custom attribute for new hire start date with the following configuration :

When i retrieve the attribute it is always returned as the day before, as an example here is a user for whom the start date is 28th of November, this is also how it displays in the user properties :

If I get the start date custom attribute in a powershell script though, for some reason, it gets the date as the day before :

I am having trouble understanding why it is returned like that, I could counter it by using .AddDays on the datetime variable i guess but would like to understand what is going on here, any input would be appreciated.

by (240 points)

1 Answer

0 votes
by (13.8k points)
selected by
Best answer

Hello,

Adaxes Administration Console always displays date attribute values in local date/time format. But when the values are queried via a PowerShell script they are returned in UTC format. In the provided example the CustomAttributeDate1 property value is 10/27/2019 11:00 PM UTC which is 10/28/2019 12:00 AM in your local time. In the console, the time part is omitted when it is set to 12:00 AM this is why the attribute value is displayed as 10/28/2019.

Related questions

0 votes
1 answer

We have a custom date attribute that has stopped working correctly, it is set for indicating a new user's start date in an account creation form. This is then used to generate a ... the date is the wrong way round, the server is set as a UK date/time format.

asked Mar 9, 2023 by mashworth (80 points)
0 votes
1 answer

Hi, during account creation we store a user/requester DN in field adm-CustomAttributeObject2 If now this requester is disabled, I want to find all users in AD ... field. I found some articles and scripts, but nothing working as expected.

asked Feb 27 by wintec01 (1.5k points)
0 votes
1 answer

Thanks for the info. I'm now grabbing the %adm-ManagerUserName% value, but need to remove the final 21 characters of it so it contains only their username and not our ... this in the PowerShell Script Editor for my business rule, I get the following error:

asked Mar 11, 2021 by mkvidera (60 points)
0 votes
1 answer

Is it possible to to get all users with a custom attribute defined? In PowerShell I'd be doing this: $s = get-aduser -filter 'Description -like "Sales Engineer"' | Select ... -like "True"' | Select Name Is this possible? Thanks for any help or tips!

asked Aug 7, 2018 by jake_h (300 points)
0 votes
1 answer

In the user creation entry I have added a renamed custom attribute called Start Date so that the requester can only request accounts be created past a certain relative ... a limitation of the product or am I looking to implement this requirement incorrectly?

asked May 28, 2021 by manomano (80 points)
3,539 questions
3,230 answers
8,225 comments
547,759 users