import datetime timestamp = "1523126888080" your_dt = datetime.datetime.fromtimestamp(int(timestamp)/1000) # using the local timezone print(your_dt.strftime("%Y-%m-%d %H:%M:%S")) # 2018-04-07 20:48:08, YMMV