aspose file tools*
The moose likes JBoss/WildFly and the fly likes How can I set timezone for Jboss server Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » JBoss/WildFly
Bookmark "How can I set timezone for Jboss server" Watch "How can I set timezone for Jboss server" New topic
Author

How can I set timezone for Jboss server

betul aydin
Greenhorn

Joined: Jan 08, 2008
Posts: 19
Hi
I use jboss application server 4.2.3 İn my my application tahat run on the server,I have timezone problem.Time appeared wrong.I think it is about server localization setting.And how can set timezone for turkey on the run.bat of jboss server?
thanks
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

Are you running on a Windows system? I asked because you mentioned run.bat (which is Windows specific) but most of the time that I hear about timezone issues it is with Linux.

Is your Windows system clock set up with the correct timezone? The JVM should pick up the timezone from there. Or if you want to set a timezone, you can add "-Duser.timezone=xxx", where 'xxx' is your timezone name, to JAVA_OPTS in run.nat.


JBoss In Action
betul aydin
Greenhorn

Joined: Jan 08, 2008
Posts: 19
hi Peter thank for your reply.
Yes I use windows system.I want to set local as turkey but I couldnt do it.yes I set -Duser.timezone=GBT,-Duser.timezone=GMT,-Duser.timezone=tr_TR all this I tryed them on run.bat.
But it is not works.The time not correct.
Can you help me ?
thanks
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10059
    
163

The time not correct.


When you say time is not correct, what exactly is the difference? Can you give an example?

Also, does Turkey fall under Day Light Saving timezones? If yes, then you will have to make sure that the JDK you are using has the patched day light saving (DST) timezone and also you windows OS is configured for DST


[My Blog] [JavaRanch Journal]
betul aydin
Greenhorn

Joined: Jan 08, 2008
Posts: 19
Hi the time is appearing two hours early.Ye Turkey fall under daylight stay and windows system time has been configurated as daylight stay.How can patch jsf for daylight stay can you explain?
thanks
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

What are the timezone settings in the Date and Time Property dialog for your Windows box?
betul aydin
Greenhorn

Joined: Jan 08, 2008
Posts: 19
The timezone setting for windows is (GMT+2,Atina,İsanbul,Minsk),local is TURKEY
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5823
    
    7

Sounds like debugging time to me. I would start with a simple Java app that does some simple time stuff (perhaps log some text using log4j and include the timestamp in the log entries). If that shows the wrong time, then the problem is related to the JVM, and not to JBoss AS. It could be that your timezone files are corrupted.

Which brings up a good question - are the timestamps in the JBoss AS server.log correct? If so. JBoss AS is getting the correct timezone and all that is left to figure out is why your app has the wrong timezone. Perhaps an incorrect timezone setting in the browser? You might have to look at the HTTP headers.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How can I set timezone for Jboss server