issrg.utils
Class TimeZoneUtil

java.lang.Object
  extended by issrg.utils.TimeZoneUtil

public class TimeZoneUtil
extends java.lang.Object

This class contains utility methods for dealing with TimeZones. They are needed because the default Java implementation of getTimeZone falls back onto the GMT time zone, when it is passed a string that does not represent a valid time zone.

It is very instructive to read the Javadoc information on the TimeZone class.

Author:
sfl

Method Summary
static boolean isValidTimeZone(java.lang.String tzString)
          Tests if a given string represents a valid Java Time Zone.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isValidTimeZone

public static boolean isValidTimeZone(java.lang.String tzString)
Tests if a given string represents a valid Java Time Zone. In doing so all leading and trailing spaces are ignored.

Parameters:
tzString - a string representing a time zone.
Returns:
true is the given string was recognised as a time zone, false otherwise.