Printout Header
LEX RSS Feed

LEX Online Manual Content

Editor for Microsoft Timestamp Attributes

This editor is used to show, edit or create Microsoft timestamp attributes. Such LDAP attributes are used quite exclusively in Microsoft Active Directory environments.

Editor for Microsoft timestamp attributes

Actually, these attributes are marked in the AD directory schema with the attribute syntax Large Integer. These are signed numeric values which can be huge values (from -2^63 to 2^63-1).
In some cases, a large integer value has to be interpreted as a date and time value. It can be read as a Microsoft Filetime structure then, expressing the 100-nanosecond steps since 12:00 AM, January 1, 1601.

Some of the most interesting date/time attributes in AD environments (for example lastLogon, lastLogonTimestamp, pwdLastSet, accountExpires) are Large Integers which have to be interpreted as date and time.

Attention: No matter if you are just want to display a date and time value or if you have to write a value to the directory: Don't forget that LEX normally adjust the values according to the time zone of your machine. Most LDAP server stores date and time values internally in UTC format: Coordinated Universal Time - this is (almost) the former Greenwich Meantime (GMT).

So if you working an a computer which is in the middle european time zone (UTC+01) and you see the time 3 PM, than this is actually 2 PM in UTC time. So in the server, the value 2 PM is stored, although you see 3 PM in this editor. The same thing in write operations for date and time attributes. If you perform an attribute write operation with this editor with 10 AM, LEX re-calculates this to UTC and writes 9 PM in our example. If you do not want LEX to adjust date and time values to the machine's time zone, you have to go to the Tools - Option - LDAP Settings tab and deactivate the Convert date and time values in local machine time option!

In the top area of this dialog, you see the distinguished name and type icon for the object whose attribute your are editing. In the line beneath, the attribute name is shown.

You see two input fields, one for the date value, one for the time value - you can easily set the values you want with this. The Set to "Now" button can set automatically the current date and time. To ease the input of dates which could be interesting, the Set to... pulldown menu can set date relative to now:

Setting the date/time value relative to now

The buttons Set to "Never" and Set to "No Date" enable you to set two important special values which are often used by Microsoft in such timestamp attributes. These two values can not be expressed a s a real date and time, but they have to according meanings in many situations. Examples are the Microsoft Timestamp attributes lastLogon (=> "Never") or pwdLastSet (=> "No Date").

If you set an attribute to 'Never', the value is set to 9223372036854775807 (the highest possible large integer value). If you set an attribute to 'No Date', the value is set to 0. For there is no real date and time to show with these values, the display changes to this output:

Setting a special timestamp


Editing the raw Microsoft timestamp data


If you opened a MS timestamp attribute with this editor dialog, you can also display and edit the timestamp data in it's numeric (Large Integer) form if you want: Just press on the Raw label in the bottom left corner of the dialog. The editor is switched to an text editor then:

Editing the raw Microsoft timestamp data

You can enter any decimal number between

-9223372036854775808 (-2^63)
and
9223372036854775807 (2^63 - 1) 

You need this for example if you want to deactivate the user setting 'User must change password at next logon' in the standard AD User and Computers tool:


User must change password setting in AUC

Do deactivate this setting, you just have to go to the regarding user account and set the attribute pwdLastSet to -1. This attribute is in fact a Microsoft timestamp which normally expresses the date and time when this user's password was set the last time. You can only set this attribute's value to -1 by switching the editor in raw mode and just enter the negative number:

User must change password setting in LEX


When will the Microsoft timestamp editor will be used?


Since the internal characteristics of a large integer representing a date and time value are not expressed in the directory schema, LEX has to hold a list of names of such attributes. Whenever an attribute of that list is to be shown or edited, LEX shows it in the editor for Microsoft timestamps attributes.

You can configure this list in the Tools - Options - Attribute Syntaxes tab with the Datetime Attributes button. Normally you will not have to work hard on this list because all the standard Large Integer attributes which are date and time values are predefined as default here:

Setting the list of MS timestamp attributes

 

Tweet