On Thu, 20 Jan 2005 11:18:12 -0500, Tim Funk <[EMAIL PROTECTED]> wrote:
> Odd. Is it possible the userid being used to launch tomcat has a borked
> environment variable?
>
> For example:
> public class Foo {
> public static void main(String args[]) {
> System.out.println(""+ new java.util.Date());
> }
> }
>
> [EMAIL PROTECTED]: echo $TZ; java Foo
> EST5EDT
> Thu Jan 20 11:12:15 EST 2005
>
> [EMAIL PROTECTED]: export TZ=GMT
> [EMAIL PROTECTED]: echo $TZ; java Foo
> GMT
> Thu Jan 20 16:12:39 GMT+00:00 2005
>
> [EMAIL PROTECTED]: export TZ=PST8PDT
> [EMAIL PROTECTED]: echo $TZ; java Foo
> PST8PDT
> Thu Jan 20 08:13:36 PST 2005
>
> Using java 1.4.2 - HP-UX 11.00
>
> -Tim
>
> Wendy Smoak wrote:
>
> > From: "Tim Funk" <[EMAIL PROTECTED]>
> >
> >>Before you start tomcat - change the TZ environment variable.
> >>
> >>export TZ=GMT
> >>(Or your favorite timezone)
> >
> >
> > Thanks! The timezone appears to be set already, and everything else on the
> > server knows what time it is. Only Tomcat thinks it lives in GMT.
> >
> > # date
> > Thu Jan 20 08:40:34 MST 2005
> > # echo $TZ
> > MST7
> >
> > Anything else we can check? We're going to set CATALINA_OPTS and see if
> > that helps, it's just strange that we've never had to mess with it before.
> > :/ (I have an app that uses the current date as part of a filename-- and it
> > stops working at 5pm when Tomcat thinks it's already tomorrow.)
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
Modern unices are more elaborate than just setting the TZ environment
variable. In Redhat Linux, for example, the file /etc/localtime is a
link to a file in the /usr/share/zoneinfo directories which specifies
lots of time related things.
However, some applications like Java also use the ZONE value in
/etc/sysconfig/clock which contains the timezone name. These two
should match.
HTH.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]