hi,
calendar.set(year , month , day , hour , minute , second);
TimeZone timeZone = null;
if ((timezone != null) && (!(timezone.toString().equals(""))))
{
timeZone = TimeZone.getTimeZone(timezone);
if (!timezone.equalsIgnoreCase(timeZone.getID()))
{
String msg = MPWAUtils.getLogMessage(
"error.general.invalid_time");
log.error(msg);
throw new InvalidParameterException(
MPWAConstants.ERRMSG_INVALID_TIME , msg);
}
log.debug("time zone " + timeZone);
calendar.setTimeZone(timeZone);
log.debug("time zone after set in Calendar " + timeZone);
//Generate TimeStamp from Calendar
timeStamp = new Timestamp(calendar.getTime().getTime());
i use above code to check any entered time zone is valid.
i need to check its validity and throw an exception if it is wrong timeZone.
but i dont want the time zone to be converted to default one.
and i need to get all available time zones in the world.
currently TimeZOne.getAvailableZones() will not get all of them\
help me
thanks maoj.