M. Ranganathan wrote:
> On Thu, Mar 19, 2009 at 5:39 PM, Andy Spitzer <[email protected]> wrote:
>> Woof!
>>
>> Once upon a time, I wrote SipFoundryLayout.  I've recently revisited it, and 
>> found some changes that I don't get
>>
>> My original code used this for DateFormat:
>>  dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSSSS'Z'") ;
>>
>> Which then got changed in the sipXbridge version (before this got moved to 
>> sipXcommons) to this:
>>  dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'");
>>
>> This was the checkin:
>>  Author:       mranga
>>  Date: Thu Apr 17 19:26:50 2008 UTC (11 months ago)
>>  Log Message: fixed logging bug (reported by Scott from sipit).
>>  http://sipxecs.sipfoundry.org/ViewVC/sipXecs?view=rev&revision=12346
>>
>> And then, later this got added:
>>  /** Sorry for this ugly routine. It is here because SIPX needs six digits
>>   * and I cannot find a way to make SimpleDateFormat do that.
>>   */
>>  private String munge(String input) ...
>>
>> This was that checkin:
>>  Author: mranga
>>  Date: Fri Apr 18 14:22:09 2008 UTC (11 months ago)
>>  Log Message:  Fixes logging format for Date.
>>
>> I'm at a loss as to why the first date format (with the "SSSSSS" above) 
>> didn't work.  It seems to work fine for me, so what exactly did Scott report 
>> from sipit?  And, if "SSSSSS" doesn't work, how about "SSS000"?  That also 
>> works for me.
>>
> 
> We had the discussion quite some time ago, I will look for the mail
> where we discussed it ( the details are a bit murky) and share it if I
> can find it. The conclusion at the end of the discussion was that was
> that  JAVA Date format does not provide the accuracy needed. All the
> other logging is to microsecond accuracy. JAVA needs to maintain the
> same format (please ask Scott why). Java Date is not able to provide
> it Date can only do millisecond accuracy. Date does not do SSSSSS. The
> hack that I did fixed the problem ( albeit somewhat crudely). I
> figured it was only logging and hence did not  need to be super
> efficient . If there is a more elegant fix, please fix it  (but please
> also try a few siptraces to be sure -- arcs in reverse order ruins the
> utility of sipviewer). My personal preference would be to leave it as
> such given that it works fine now and it is logging code that does not
> need to be extremely efficient. Perhaps there is a better way of
> manipulating Strings than what I came up with.
> 

Let's just use 'SSS000'. That used to work for me when sipXconfig had its
own copy of the formatter.
D.

_______________________________________________
sipx-dev mailing list
[email protected]
List Archive: http://list.sipfoundry.org/archive/sipx-dev
Unsubscribe: http://list.sipfoundry.org/mailman/listinfo/sipx-dev

Reply via email to