directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "TvT (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (DIRAPI-284) DateUtils throws an exception for certain timestamps
Date Mon, 29 Aug 2016 15:48:20 GMT

    [ 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:48 PM:
-----------------------------------------------------

Agreed on the *icrosoft comments :-D

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}

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

> 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)

Mime
View raw message