[ 
https://issues.apache.org/jira/browse/DIRAPI-284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15446225#comment-15446225
 ] 

TvT edited comment on DIRAPI-284 at 8/29/16 3:46 PM:
-----------------------------------------------------

I just realized that there are different timestamps - the one defined in the  
ISO8601 and there is a 18-digit timestamp (http://www.epochconverter.com/ldap) 
{quote}The 18-digit Active Directory timestamps, also named 'Windows NT time 
format' and 'Win32 FILETIME or SYSTEMTIME'. These are used in Microsoft Active 
Directory for *pwdLastSet*, *accountExpires*, *LastLogon*, *LastLogonTimestamp* 
and *LastPwdSet*. The timestamp is the number of 100-nanoseconds intervals (1 
nanosecond = one billionth of a second) since Jan 1, 1601 UTC. The current 
LDAP/Win32 FILETIME is: 131169589170000000.{quote}

I need to convert the content of 'accountExpires' so can DateUtils handle the 
18-digit timestamp? (Currently only exceptions are thrown)


was (Author: teewetee):
I just realized that there are different timestamps - the one defined in the  
ISO8601 and there is a 18-digit timestamp (http://www.epochconverter.com/ldap) 
{quote}The 18-digit Active Directory timestamps, also named 'Windows NT time 
format' and 'Win32 FILETIME or SYSTEMTIME'. These are used in Microsoft Active 
Directory for *pwdLastSet*, *accountExpires*, *LastLogon*, *LastLogonTimestamp* 
and *LastPwdSet*. The timestamp is the number of 100-nanoseconds intervals (1 
nanosecond = one billionth of a second) since Jan 1, 1601 UTC. The current 
LDAP/Win32 FILETIME is: 131169589170000000.{quote}

Can your DateUtils handle the 18-digit timestamp with your class? Because I 
only get exceptions...

> DateUtils throws an exception for certain timestamps
> ----------------------------------------------------
>
>                 Key: DIRAPI-284
>                 URL: https://issues.apache.org/jira/browse/DIRAPI-284
>             Project: Directory Client API
>          Issue Type: Bug
>    Affects Versions: 1.0.0-RC1
>         Environment: All
>            Reporter: TvT
>             Fix For: 1.0.0-RC2
>
>
> The DateUtils class can't handle certain timestamps.
> The following code
> _DateUtils.getDate("9223372036854775807");_
> throws an "java.lang.RuntimeException: java.text.ParseException: ERR_04363 
> Invalid Time too short, expected field 'fraction of second' or 'timezone'."
> The value in [microsofts active directory 
> |https://msdn.microsoft.com/en-us/library/ms675098%28v=vs.85%29.aspx]indicates
>  that e.g. an account never expires...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to