View Single Post
Old 06-02-2011, 02:02 AM  
just a punk
So fuckin' bored
 
just a punk's Avatar
 
Industry Role:
Join Date: Jun 2003
Posts: 32,350
I believe you are doing something wrong. For example, this code will generate random time in range 10..20 minutes:
Code:
$post ['custom_fields'] ['time'] = date ( 'i:s', rand ( 600, 1200 ) );
Here is an example:
Code:
for($i = 0; $i < 10; $i ++) {
	echo date ( 'i:s', rand ( 600, 1200 ) ) . "\n";
}
Its output is the following:
18:43
18:07
10:17
11:04
16:38
11:32
10:55
18:46
17:28
19:25

So everything looks ok to me.
__________________
Obey the Cowgod

Last edited by just a punk; 06-02-2011 at 02:07 AM..
just a punk is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote