Sponsored Link •
|
Advertisement
|
Advertisement
|
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.
Message:
Okay, I apologize. You are correct -- I shouldn't be such a smartass. Please forgive me. I'll try to make amends by providing some (hopefully) useful information: I've tried out what you are talking about with tomcat on a Linux box, connecting to it with two different Windows systems, both with different locale settings. It seems to work as I would expect (it is always the time from the server, with the server's local), so maybe I don't understand what you mean by "running on another machine." Do you mean running the JSP in acontainer (tomcat, or whatever) on another machine, or running the JSP (from the original container/server) in a browser on a different machine? Also, (and perhaps more importantly) it looks like you may want to use java.util.Calendar, instead of Date. With Calendar, you can initialize it with a particular locale, which may solve your problem. Also, Date has a lot of stuff deprecated in Java 2, so I guess Sun is trying to get people to move to using Calendar. - mfg > 1. i tried parsing the dateString to Date object. It doesn't work. the dateString using the SimpleDateFormat works fine. > to narrate my point : > part of code: > //parsing dateString back to Date object > but 'date' doesn't follow my time zone. > sample output : > again, any eccentricity ONLY occurs abberently in JSP. > so master matt? any ideas? :) > i hope to find a way to evade the 'silly' parseInt() i was using.
Replies: |
Sponsored Links
|