How to create random time within a range

How to create random time during a time interval? I want to create a random time between 9:00 and 11:30.

+2
source share
1 answer

use rand()

rand(Time.parse('9 am')..Time.parse('11:30 am'))

+9
source

Source: https://habr.com/ru/post/1274748/


All Articles