directory-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kiran Ayyagari <ayyagariki...@gmail.com>
Subject Re: [SHARED-LDAP] new methods in DateUtils class
Date Sun, 09 Nov 2008 08:43:58 GMT
thanks Seelmann for the info, however the quartz LDAP store on which am
currently working will be part of the server so using DateUtils will do the
work.

I have another question, the clients will change the scheduled execution time 
for a quartz job/trigger, in this case

1) should we force the user to specify time in GMT? or
2) would it be better if we take the client's timezone along with time and doing
    the actual conversion to GMT


   P.S :- 1 is putting pain on the user side which I think we all try to avoid :)

wdot?

Kiran Ayyagari

Stefan Seelmann wrote:
> Hi Kiran,
> 
> sure, you could add these convenient methods.
> 
> However be aware of the missing time zone information. Date objects and
> timestamps don't contain any time zone information while the generalized
> time does. The DateUtils class always assumes 'Z' time zone.
> 
> For that reason I created a GeneralizedTime class that is based on
> java.util.Calendar.
> 
> Kind Regards,
> Stefan Seelmann
> 
> 
> 
> Kiran Ayyagari wrote:
>> hi guys,
>>
>>    I want to add two new methods to DateUtils class for getting the
>> generalized
>>    time string in a convenient way when providing a Date object or time
>> as a
>>    long value
>>
>>    waiting for your view(s) before committing it
>>
>>    they look like below mentioned code
>>
>>     /**
>>      *
>>      * @see #getGeneralizedTime()
>>      *
>>      * @param date the date to be converted to generalized time string
>>      * @return given date in the generalized time string format
>>      */
>>     public static String getGeneralizedTime( Date date )
>>     {
>>         synchronized ( dateFormat )
>>         {
>>             return dateFormat.format( date );
>>         }
>>     }
>>
>>
>>     /**
>>      *
>>      * @see #getGeneralizedTime()
>>      *
>>      * @param time the time value to be converted to generalized time
>> string
>>      * @return given time in generalized time string format
>>      */
>>     public static String getGeneralizedTime( long time )
>>     {
>>         return getGeneralizedTime( new Date( time ) );
>>     }
>>
> 
> 

Mime
View raw message