#1 2011-03-07 21:25:36

RickV
New member
Registered: 2011-03-07
Posts: 2

tLDAPinput and timestamps

In LDAP dates are given in the data format Integer8, an integer stored in eight bytes. This field represents the number of 100 nanoseconds since January 1st 1601. When I use tLAPinput to request i.e. the attributes lastLogon or lastLogonTimestamp I get the dates as strings. How can I convert these strings to a valid Java date?
I've found some quite detailed info on AD timestamps on technet but that article only refers to vbScript. After running into the wall several times I have to admit that my knowledge of Java is not sufficient to solve this (probably simple) puzzle.
Can anyone tell me how to trick Talend Open Studio 4.0.2 into handling these timestamps as regular dates?

With kind regards,
Rick

Hmm. bbcode URL does not show up. This is the URL to the article on technet: http://blogs.technet.com/b/heyscriptingguy/archive/2010/01/27/dandelions-vcr-clocks-and-last-logon-times-these-are-a-few-of-our-least-favorite-things.aspx

Last edited by RickV (2011-03-07 21:45:22)

Offline

#2 2011-03-08 04:12:15

shong
Talend team
Registered: 2007-08-29
Posts: 10289
Website

Re: tLDAPinput and timestamps

Hello
What does the query result of lastLogonTimestamp on console?

tLDAPInput--main-->tLogRow

Best regards
Shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#3 2011-03-09 14:44:58

RickV
New member
Registered: 2011-03-07
Posts: 2

Re: tLDAPinput and timestamps

shong wrote:

What does the query result of lastLogonTimestamp on console?

tLDAPInput--main-->tLogRow

When using just tLDAPInput and tLogRow an LDAP timestamp field (in this case LastLogon) looks like this:

Code:

|=-----------------------------------------------------------+-----------------=|
|dn                                                          |lastLogon         |
|=-----------------------------------------------------------+-----------------=|
|CN=Testuser\, JustSome,OU=Test_Users,DC=Testdomain1,DC=Local|129437141280683923|

The timestamp corresponds to UTC: Fri, 04 Mar 2011 12:08:48 GMT

Last edited by RickV (2011-03-09 14:55:54)

Offline

Board footer

Powered by FluxBB