code: public static DateTime toDateTime(String input, String format, String timezone) {
      String tz = StringUtils.defaultString(timezone, ConfigurationKeys.DEFAULT_SOURCE_TIMEZONE);
      DateTimeZone dateTimeZone = getTimeZone(tz);
      DateTimeFormatter inputDtFormat = DateTimeFormat.forPattern(format).withZone(dateTimeZone);
      DateTime outputDateTime = inputDtFormat.parseDateTime(input).withZone(dateTimeZone);
      return outputDateTime;
    }
docs: Convert timestamp in a string format to joda time
  @param input timestamp
  @param format timestamp format
  @param timezone time zone of timestamp
  @return joda time