Long timestamp = Instant.now().toEpochMilli(); // fallback
if (oTimestamp instanceof Integer)
    timestamp = (Integer) oTimestamp *1L;
else
    if (oTimestamp instanceof Long)
        timestamp = (Long) oTimestamp * 1L;
By Anonymous, 2017-12-12 08:13:40