To be less terse:
The Date object is kind of like my wife when I get all excited about
technology... it only acts like it cares about time zone.
If you're parsing from text, try feeding the DateFormat object a TimeZone
before parsing:
DateFormat formatter = DateFormat.getDateTimeInstance
(DateFormat.SHORT, DateFormat.MEDIUM);
formatter.setTimeZone(TimeZone.getTimeZone("UTC"));
Date date = formatter.parse(dateString);
On 7/25/05, Michael Meadows <[EMAIL PROTECTED]> wrote:
>
> Feed it to the Calendar (yum).
>
> On 25 Jul 2005 03:43:54 -0000, syed abrar <[EMAIL PROTECTED]>
> wrote:
> >
> >
> > Hello
> > This problem is more of a core java issue than a struts one.
> > I have a user interface to accept time and another field to enter the
> > difference of time with GMT (GMT+x or GMT-1) .
> > I have to accept this time and convert the time exactly into the
> > timezone in which the server is running and store.
> > Can anyone help me in this(converting into the time zone) and please if
> > you have any sample code ,send it along.
> >
> > Regards
> > Abrar
> >
>
>