public static long getTimestamp(long timeBucket, DownSampling downsampling) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTimeInMillis(0);
        calendar.set(Calendar.MINUTE, 0);
        calendar.set(Calendar.HOUR_OF_DAY, 0);

        switch (downsampling) {
            case Second:
                calendar.set(Calendar.SECOND, (int) (timeBucket % 100));
                timeBucket /= 100;
                // Fall through
            case Minute:
                calendar.set(Calendar.MINUTE, (int) (timeBucket % 100));
                timeBucket /= 100;
                // Fall through
            case Hour:
                calendar.set(Calendar.HOUR_OF_DAY, (int) (timeBucket % 100));
                timeBucket /= 100;
                // Fall through
            case Day:
                calendar.set(Calendar.DAY_OF_MONTH, (int) (timeBucket % 100));
                timeBucket /= 100;
                calendar.set(Calendar.MONTH, (int) (timeBucket % 100) - 1);
                calendar.set(Calendar.YEAR, (int) (timeBucket / 100));
                break;
            default:
                throw new UnsupportedOperationException("Unknown downsampling value.");
        }
        return calendar.getTimeInMillis();
    }
Convert TimeBucket to Timestamp in millisecond.

@param timeBucket   long
@param downsampling Downsampling
@return timestamp in millisecond unit
test/e2e-v2/java-test-service/e2e-mock-baseline-server/src/main/java/org/apache/skywalking/e2e/TimeBucket.java