from datetime import datetime,date
dayOfWeek = datetime.now().weekday()
print dayOfWeek
******************************************************************
import time
import datetime
dtime = datetime.datetime.now()
ans_time = time.mktime(dtime.timetuple())
unix_ts = 1439111214.0
time = datetime.datetime.fromtimestamp(unix_ts)