``` val millis: Long = calendar.get(Calendar.HOUR_...
# announcements
a
Copy code
val millis: Long = calendar.get(Calendar.HOUR_OF_DAY).toLong() * 60 * 60 * 1000
        .plus(calendar.get(Calendar.MINUTE).toLong() * 60 * 1000)
        .plus(calendar.get(Calendar.SECOND).toLong() * 1000)
        .plus(calendar.get(Calendar.MILLISECOND).toLong())

 val millis2: Long = calendar.get(Calendar.HOUR_OF_DAY).toLong() * 60 * 60 * 1000 +
        calendar.get(Calendar.MINUTE).toLong() * 60 * 1000 +
        calendar.get(Calendar.SECOND).toLong() * 1000 +
        calendar.get(Calendar.MILLISECOND).toLong()

 Assert.assertEquals(millis, millis2)