Unix timestamp converted to normal YYYY-MM-DD HH-MM-S
Def stringToUnix (string):
UnixTime = time.mktime (time.strptime (string, "% Y-%m-%d% H:%M:%S"))
Return str (unixTime)
Def newUnixTime (time_input, oldtimeList):
NewUnixTimeList = []
For oldtime in oldtimeList:
Olddatetime = datetime.fromtimestamp (int (oldtime))
DayAndhms = str (olddatetime) .split ("")
Newtime = time_input +''+ dayAndhms [1]
New_Time = stringToUnix (newtime)
NewUnixTimeList.append (new_Time)
Return newUnixTimeList