code: public static void setTimeZone(final SimpleDateFormat fmt,
                                    final String tzname) {
      if (tzname == null) {
        return;  // Use the default timezone.
      }
      final TimeZone tz = DateTime.timezones.get(tzname);
      if (tz != null) {
        fmt.setTimeZone(tz);
      } else {
        throw new IllegalArgumentException("Invalid timezone name: " + tzname);
      }
    }
docs: Applies the given timezone to the given date format.
  @param fmt Date format to apply the timezone to.
  @param tzname Name of the timezone, or {@code null} in which case this
  function is a no-op.
  @throws IllegalArgumentException if tzname isn't a valid timezone name.
  @throws NullPointerException if the format is null