The strange thing is, Sun created the Calendar class to
replace the Date class because they thought Date was too
difficult to use!  You are not wrong; Calendar is one of the
more difficult classes with which to work in Java.

-mark

-----Original Message-----
From: A mailing list for discussion about Sun Microsystem's
Java Servlet
API Technology. [mailto:[EMAIL PROTECTED]]On
Behalf Of
Andr�s Wagner
Sent: Friday, January 05, 2001 12:59 PM
To: [EMAIL PROTECTED]
Subject: Re: TimeZone problem


>Try,  dateFormatter.setTimeZone(tz);
>after you get the timezone.

Ok, thanks.. but why does not take care of this the
GregorianCalendar
(TimeZone)???
Anyway....

My problem now is that the " TimeZone.inDayligthTime(Date)"
does not
return a true value and the zone is in SavingTime. And i can
not find
any method that increase the time when it is in
"DayligthTime".

Is always so hard to use Dates on JAVA? Is there any new
version of
the Date and Gregorian Calendar? I'm finishing a big servlet
and I
can't belive that the hardest thing of all the project is to
put a
simple Date...


>
>  >Here is my problem, I want display a servlet message
with the current
>>time, but I always get the "default" time zone although I
create a
>>new TimeZone.
>>Ok, please tell me what I'm doing wrong, because i'm out
of ideas....
>>
>>THE SOURCE:
>>
>>Locale aLocale = new Locale("es", "CL");
>>
>>DateFormat dateFormatter= DateFormat.getDateTimeInstance
>>
(DateFormat.FULL,DateFormat.FULL,aLocale);
>>
>>TimeZone tz = TimeZone.getTimeZone("EST");
>>
>>String myDate = dateFormatter.format((new
>>GregorianCalendar(tz,aLocale)).getTime());
>>
>>System.out.println(myDate);
>>
>>
>>Thanks again!
>>
>>--
>  >__________________________________
--
__________________________________
Andr�s Wagner Acu�a
Estudiante Ing. Civil Industrial
Universidad Adolfo Iba�ez

ICQ: 39542425
__________________________________

"Programing today is a race between software engineers
striving to
build bigger and better idiot-proof programs, and the
universe trying
to produce bigger and better idiots...
                                ...So far the universe is
winning".

-Rich Cook

____________________________________________________________
_______________
To unsubscribe, send email to [EMAIL PROTECTED] and
include in the body
of the message "signoff SERVLET-INTEREST".

Archives:
http://archives.java.sun.com/archives/servlet-interest.html
Resources:
http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to