Android ZoneDateTime.withHour always sets hour to 8

So I am tring to schedule alarm at a particular time on current day using AlarmManager. To do that I am using ZoneDateTime to get current time and then updating it to the hour at which I need to set the alarm. But for some reason time.withHour is giving me 8pm or 8am no matter what hour I am passing to it. Am I doing something wrong here?

var time = ZonedDateTime.now()    //getting current time at my timezone
time = time.withHour(22).withMinute(8).withSecond(0)
print(time)                       //getting 8am/8pm at my timezone
val timeMilis = time.toInstant().toEpochMilli()
How many English words
do you know?
Test your English vocabulary size, and measure
how many words do you know
Online Test
Powered by Examplum