Random time : Time : Buildin Module PYTHON TUTORIALS


PYTHON TUTORIALS » Buildin Module » Time »

 

Random time


from random import *
from time import *

date1 = (200511000, -1, -1, -1)
time1 = mktime(date1)
date2 = (200611000, -1, -1, -1)
time2 = mktime(date2)
random_time = uniform(time1, time2)
print asctime(localtime(random_time))



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


PYTHON TUTORIALS

 Navioo Buildin Module
» Time