I receive a timestamp from a server like this 1512543958 & when i send back requests in headers i see a 13 digit GMT time stamp like this 1512544485819
By changing the time to local using the code below i get 2017-12-06 12:35:58
print(datetime.datetime.fromtimestamp(int("1512544474")).strftime('%Y-%m-%d %H:%M:%S')
& when i apply the code below i get 'Wed 06 Dec 2017 07:14:45 GMT'
time.strftime("%a %d %b %Y %H:%M:%S GMT", time.gmtime(1512544485819 / 1000.0))
So basically i need a python function that takes the 10 digit date timestamp as argument & returns 13 digit GMT date timestamp
example input 1512544474
expected output 1512544485819