Lets say I have a string that represents a date that looks like this:
\"Wed Jul 08 17:08:48 GMT 2009\"
So I parse that string into a date object like this:
Sorry for digging out an old-thread. But I was wondering if there is a java-class that holds all the time-zone-ids as a constant class. So instead of having to hard-code the time-zone-id while setting time-zone like this:
formatter.setTimeZone(TimeZone.getTimeZone("US/Central"));
we would instead be doing something more standard/uniform:
formatter.setTimeZone(TimeZone.getTimeZone(SomeConstantClass.US_CENTRAL));
where SomeConstantClass.java is a class that holds the constants referring to the different time-zone-ids that are supported by the TimeZone class.