I have a timestamp which is coming from a remote Linux box. This is the timestamp 1356354496. When I am using the fromtimestamp function I am getting a different output then what it should be.
Example:
from datetime import datetime
import time
print(time.ctime(int("1356354496")))
cwStartTimeDisplay=datetime.fromtimestamp(int("1356354496")).strftime("%a %b %d %H:%M:%S %Y")
print(cwStartTimeDisplay)
Output
Mon Dec 24 05:08:16 2012 Mon Dec 24 05:08:16 2012
Whereas I should be getting 12/24/2012 6:38:16 PM. I am a beginner and don't really know if tz parameter is the answer to this. Can anybody help please?
time.time()?