Re: Java not seeing timezone/tomcat displaying times in GMT

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Feb 8, 2008 6:18 PM, Isaac Gonzalez <igonzalez@xxxxxxxxxxxxxx> wrote:
> I'm setting export CATALINA_OPTS= "Duser.timezone=America/Los_Angeles"
> in my init.d script that starts up the tomcat(haven't set it in
> $CATALINA_HOME/bin/setenv.sh)...but will try that as well ....i wrote a
> simple java function that print the date, and when I call java foo, it
> prints the correct date format. I haven't tried the jsp page, but will
> also try that...seems as if tomcat is ignoring everything I set.

This is definitely a Tomcat issue. You should take it to a Tomcat
list. I can tell you what I found though:

I ran Tomcat in a debugger to locate the code that generates the
directory listing text. In the Tomcat 5.5.23 source code in class
org.apache.naming.resources.ResourceAttribute, the timezone for the
date formatter is hard coded as GMT. Nice, huh?

Maybe there's a way to manipulate that, but I don't know it. The
Tomcat developers probably don't care much about it because Tomcat is
seldom used to serve static content.

But at least you can stop letting the time zone configuration drive you crazy...

--
Jeff
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux