commonlib/src/main/java/com/streamsets/pipeline/lib/util/AvroTypeUtil.java
public static long daysToMillis(int days) {
    long millisUtc = (long)days * MILLIS_PER_DAY;
    long tmp = millisUtc - (long)(localTimeZone.getOffset(millisUtc));
    return millisUtc - (long)(localTimeZone.getOffset(tmp));
  }
public static long daysToMillis(int days) {
    long millisUtc = (long)days * MILLIS_PER_DAY;
    long tmp = millisUtc - (long)(localTimeZone.getOffset(millisUtc));
    return millisUtc - (long)(localTimeZone.getOffset(tmp));
  }
Return Date in milliseconds
@param days Number of days since unix epoch
@return Milliseconds representation for date

This function has been copied from Apache Hive project.