The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
October 2001



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.


As Ususal Nerds Can't Get A Date

Posted by Matt Gerrans on November 02, 2001 at 2:08 PM

Are you just using Date().toString() and hoping for the best? Have you looked at the DateFormat class? It works in GMT and allows you to fool with the formatting, so I think this is what you need. However, Jay is the resident JSP expert, so maybe he'll weigh in with a more specific answer for you...

- mfg

> hi ,
> i am working with mortgagae appliactions using jsp with toplink,
> i faced simillar problems,
> then i am using the javascript libraray in jsp..its working fine..u better to use javascript tags..
> if u send the lines of code , i can solve ur problem..
> thank you,
> deviprasad mundluru

> > dear ppl,

> > i'm writing a audit trail prog in JAVA for a distributed system.

> > i can grab the date by using java.util.Date. which is in
> > 'SGT' format. no problem.

> > however, when i use the same program in jsp, everything goes
> > haywire. it seems that that the "java.util.Date" gives out the
> > date in 'PST' format when used for "JSP"

> > surprisingly, a fren ran my prog at his computer and everything's fine. the date's in 'SGT' format. but as i tried it
> > out at another fren's pc, the prob reoccured.

> > why does the problem occur?
> > how can i make the prog work in JSP with the correct time?
> > how can i make sure that the problem doesn't reoccur somewhere
> > else?

> > hope u ppl can help. :)


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us