I often have to generate random clock times so I created this simple online utility that does it for me. It lets you generate however many random hours, minutes, and seconds you need from any time interval. It works in the browser and is powered by alien technology from the future.
Random Time Generator Options
Random Time Generator Examples (click to try!)
18:57:12, 18:42:35, 17:09:49, 14:04:51, 17:42:38, 13:18:38, 23:24:31, 23:24:55, 21:46:08, 15:32:28
7:0:5 am 7:0:2 am 7:0:1 am 7:0:3 am 7:0:4 am
10:100110:100010 1:110011:10100 10:100101:101100 10:100100:111000 1:100011:110000
08:19:08 am 10:54:05 am 09:39:28 am 06:51:05 am 08:54:06 am 03:48:47 pm 01:17:01 pm 06:59:03 am
12 ~ 13 ~ 22 ~ 14 ~ 10 ~ 15 ~ 4 ~ 20 ~ 11 ~ 21
04:59 am; 11:32 am; 01:36 am; 02:50 am; 07:52 am; 10:03 am; 03:51 am; 06:09 am; 00:30 am; 11:53 am; 11:06 am; 04:23 am; 08:53 am; 05:17 am; 06:52 am; 09:51 am; 03:01 am; 10:30 am; 09:59 am; 00:21 am
How Does This Random Time Generator Work?
hh:mm:ss to a number
startTime = hh*3600 + mm*60 + ss and the end time
hh:mm:ss to another number
endTime = hh*3600 + mm*60 + ss. Then, it picks a random number from the interval
[startTime, endTime]. After that, it converts this number back to a string time by dividing it by 3600 to find
hours, dividing it by 60 to find
minutes, and modding it by 60 to find
seconds. If the 12-hour clock format is selected, then it subtracts 12 from all hour values that are greater than 12, and uses the
pm indicator, otherwise it uses the
am indicator. To print the time in the selected time format, it uses the
replace() function and replaces all
/h+/i matches by the
hours value, all
/m+/i matches by the
minutes value, and all
/s+/i matches by the
Created by Browserling
This random time generator was created by me and my team at Browserling. Behind the scenes, it's actually powered by our web developer tools that are used by millions of people every month. Browserling itself is an online cross-browser testing service powered by alien technology. Check it out!
Secret message: If you love my tools, then I love you, too! Use coupon code TOOLLING to get a discount at my company.