coral-beam-runtime/src/main/java/com/linkedin/beam/excution/BeamExecUtil.java
public static Long toDateFormat(long epochTime, String timeZone) {
    final SimpleDateFormat dateParser = new SimpleDateFormat("yyyyMMdd");
    dateParser.setTimeZone(TimeZone.getTimeZone(timeZone));
    if (epochTime < 0) {
      return null;
    }

    if (epochTime < 10000000000L) {
      return Long.parseLong(dateParser.format(epochTime * 1000));
    }

    return Long.parseLong(dateParser.format(epochTime));
  }
/**
   * Converts epoch time to yyyyMMdd format in a given timezone
   *
   * @param epochTime epoch time
   * @param timeZone time zone
   */
Converts epoch time to yyyyMMdd format in a given timezone
@param epochTime epoch time
@param timeZone time zone
Converts epoch time to yyyyMMdd format in a given timezone @param epochTime epoch time @param timeZone time zone
public static Long toDateFormat(long epochTime, String timeZone) {
    final SimpleDateFormat dateParser = new SimpleDateFormat("yyyyMMdd");
    dateParser.setTimeZone(TimeZone.getTimeZone(timeZone));
    if (epochTime < 0) {
      return null;
    }
    if (epochTime < 10000000000L) {
      return Long.parseLong(dateParser.format(epochTime * 1000));
    }
    return Long.parseLong(dateParser.format(epochTime));
  }
public static Long toDateFormat ( long epochTime , String timeZone ) { final SimpleDateFormat dateParser = new SimpleDateFormat ( "yyyyMMdd" ) ; dateParser . setTimeZone ( TimeZone . getTimeZone ( timeZone ) ) ; if ( epochTime < 0 ) { return null ; } if ( epochTime < 10000000000L ) { return Long . parseLong ( dateParser . format ( epochTime * 1000 ) ) ; } return Long . parseLong ( dateParser . format ( epochTime ) ) ; }
Converts epoch time to yyyyMMdd format in a given timezone
 @param epochTime epoch time
 @param timeZone time zone
Converts epoch time to yyyyMMdd format in a given timezone @param epochTime epoch time @param timeZone time zone