You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@directory.apache.org by Enrique Rodriguez <er...@apache.org> on 2004/12/22 12:43:30 UTC

failing testGetGeneralizedTime()

Alex et al,

Regarding the failing timezone test, the draft reference at:

http://ietf.org/internet-drafts/draft-ietf-ldapbis-syntaxes-09.txt

states:

"The "Z" form of <g-time-zone> SHOULD be used in preference to 
<g-differential>."

but in org.apache.eve.jndi.ibs.OperationalAttributeService you are using 
<g-differential> 5 times with no explicit Z TimeZone to set the String 
time on modified attributes.

I propose:

1)  Move to "The "Z" form of <g-time-zone>" for this function, per the 
draft.

2)  Replace DateUtils with the following 3 lines of code, as a 
convenience method in the OperationalAttributeService, since that is the 
only place this is used (best I can tell, quick IDE reference check).


private String getGeneralizedTimeStamp()
{
   SimpleDateFormat date = new SimpleDateFormat( "yyyyMMddHHmmss'Z'" );
   date.setTimeZone( new SimpleTimeZone(0,"Z") );
   return date.format( new Date() );
}

... or is there a reason to use <g-differential> in that service?  Say 
the word and I'll commit this change.

-enrique



Re: failing testGetGeneralizedTime()

Posted by Enrique Rodriguez <er...@apache.org>.
This committed.  Should clear up the test failure.

-enrique


Alex Karasulu wrote:
> Please proceed...
> Thanks,
> Alex
> 
> Enrique Rodriguez wrote:
> 
>> Alex et al,
>>
>> Regarding the failing timezone test, the draft reference at:
>>
>> http://ietf.org/internet-drafts/draft-ietf-ldapbis-syntaxes-09.txt
>>
>> states:
>>
>> "The "Z" form of <g-time-zone> SHOULD be used in preference to 
>> <g-differential>."
>>
>> but in org.apache.eve.jndi.ibs.OperationalAttributeService you are 
>> using <g-differential> 5 times with no explicit Z TimeZone to set the 
>> String time on modified attributes.
>>
>> I propose:
>>
>> 1)  Move to "The "Z" form of <g-time-zone>" for this function, per the 
>> draft.
>>
>> 2)  Replace DateUtils with the following 3 lines of code, as a 
>> convenience method in the OperationalAttributeService, since that is 
>> the only place this is used (best I can tell, quick IDE reference check).
>>
>>
>> private String getGeneralizedTimeStamp()
>> {
>>   SimpleDateFormat date = new SimpleDateFormat( "yyyyMMddHHmmss'Z'" );
>>   date.setTimeZone( new SimpleTimeZone(0,"Z") );
>>   return date.format( new Date() );
>> }
>>
>> ... or is there a reason to use <g-differential> in that service?  Say 
>> the word and I'll commit this change.
>>
>> -enrique
>>
>>
>>

Re: failing testGetGeneralizedTime()

Posted by Alex Karasulu <ao...@bellsouth.net>.
Please proceed...
Thanks,
Alex

Enrique Rodriguez wrote:

> Alex et al,
>
> Regarding the failing timezone test, the draft reference at:
>
> http://ietf.org/internet-drafts/draft-ietf-ldapbis-syntaxes-09.txt
>
> states:
>
> "The "Z" form of <g-time-zone> SHOULD be used in preference to 
> <g-differential>."
>
> but in org.apache.eve.jndi.ibs.OperationalAttributeService you are 
> using <g-differential> 5 times with no explicit Z TimeZone to set the 
> String time on modified attributes.
>
> I propose:
>
> 1)  Move to "The "Z" form of <g-time-zone>" for this function, per the 
> draft.
>
> 2)  Replace DateUtils with the following 3 lines of code, as a 
> convenience method in the OperationalAttributeService, since that is 
> the only place this is used (best I can tell, quick IDE reference check).
>
>
> private String getGeneralizedTimeStamp()
> {
>   SimpleDateFormat date = new SimpleDateFormat( "yyyyMMddHHmmss'Z'" );
>   date.setTimeZone( new SimpleTimeZone(0,"Z") );
>   return date.format( new Date() );
> }
>
> ... or is there a reason to use <g-differential> in that service?  Say 
> the word and I'll commit this change.
>
> -enrique
>
>
>