"Hongset, Ragnar" wrote:
> 
> I'v installed:
>   Apache 1.3.6
>   Jserv 1.0
>   JSDK 2.0
>   JDK 1.1.6
>   OS: Solaris 2.5.1
> 
> My problem is .. logging to jserv.log .. everything is logged with wrong GMT
> time .. I'm located in Europe (Norway) .. so I want to log with MET, or
> GMT+1 ..  .. I'v tried to set the timezone in /etc/TIMEZONE, /etc/timezone,
> the users $TZ variable, and I'v also tried to set: ServletBinaryArgument
> -Duser.timezone=MET in jserv.properties (and to ECT .. someone told me ECT
> is MET in java ??) nothing works :-(
> 
> I had to make a filter to translate the log into MET .. but its not a good
> solution

Hi,

I had similar problems on Solaris and Linux (but not on NT). I traced it
back to the way Sun defined their time zones in JDK1.1. In my case the
JDK defined "EST" which we (and Solaris) use as "(Australian) Eastern
Standard Time" (GMT +10) as "(American) Eastern Standard Time" (GMT -5).
According to the JDK1.1 API (look at the source in
java.util.Timezone.java) It should have been "AET" or "Australian
Eastern
Time" I suppose.  I put the following code in my applications:

            // Overcoming timezone bug
            TimeZone timeZone = TimeZone.getTimeZone("AET");
            TimeZone.setDefault(timeZone);

And everything worked after that. Apparently this has been fixed in JDK
1.2 on Unix, but I am yet to test it.

I hope this helps you out.

Damian

-- 
Damian Fauth                                       201 Sussex Street
Software Engineer                                   Sydney, NSW 2000
John Fairfax Holdings Ltd                                  Australia
[EMAIL PROTECTED]                    Ph. (+612) 9282 3528


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
READ THE FAQ!!!!     <http://java.apache.org/faq/>
Archives and Other:  <http://java.apache.org/main/mail.html/>
Problems?:           [EMAIL PROTECTED]

Reply via email to