W3C home > Mailing lists > Public > www-jigsaw@w3.org > July to August 1996

Re:Date on Jigsaw

From: Alexandre Rafalovitch <alex@access.com.au>
Date: Fri, 2 Aug 1996 09:19:05 +1000
Message-Id: <v02140b06ae26e93376da@[]>
To: www-jigsaw@w3.org
At 5:16 AM 2/8/96, Nick Pollitt wrote:
>In my Jigsaw log files, the month is off by 1 - July logs
>are written as [30/6/1996:16:5:36 +5] and August logs are
>written as [1/7/1996:14:12:54 +5].  Is there any way I can
>fix this.  The OS produces the correct time with the 'date'

This is a very interesting question. In java Date.getMonth() return zero
based month. That means that January would be 0 and July would be 6. So the
code that just creates a date by combining values from getDate(),
getMonth() an getYear() would fall into this trap. In Jigsaw instance, the
code in CommonLogger is the one that did it.

An easy way to fix it is to edit  w3c.jigsaw.http.CommonLogger line 155, so
it reads {+ "/" + (now.getMonth()+1)} and then recompile the class. You
would have to shut down and restart the server after recompile.

The hard part in here is actually to recompile file and put it back into
.zip file. Send me e-mail, if you don't know how to do it. One notice here,
Jigsaw files were compiled with optimization, so if you miss -O flag,
Jigsaw might run slower... :-{.

It is my belief, that Anselm knows about this bug (feature?) and it is
going to be fixed in the next release.

Hope it helps,

Received on Thursday, 1 August 1996 19:19:04 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:25:29 UTC