I believe the problem with your code is that you are never actually using
the zone variable. Try changing the TimeZone.getTimeZone() method to use
the zone variable, then changing zone will have some effect on the
outcome.
----- Original Message -----
Sent: Tuesday, August 31, 1999 6:00
AM
Subject: Problem showing date
Hi, I'm been working in a Servlet that make a page
and, in this page I`m showing the date of the day using this
code:
DateFormat df =
DateFormat.getInstance();
String zone = "GMT-4:00";
TimeZone
tz =
TimeZone.getTimeZone("America/La_Paz");
df.setTimeZone(tz);
java.util.Date
date = new java.util.Date();
for printing the date I'm
using:
df.format(date)
My problem is this, no matters wich string for "zone" I use, it allways displays
the same time, and I want the time of my country (VENEZUELA), Windows call my
Time Zone Caracas/La Paz. Does anybody knows why this code is not showing me
my time?
Thank you very much...
Javier Tom�