In javascript console ,I tried this
d=new Date()
t=d.getTime()
When I printed t,it gave
>>1334855220112
As per documentation ,it must be the number of milliseconds since 1970/01/01
In python ,I created a datetime.datetime object as
nowdtime=datetime.datetime.today()
print str(int(nowdtime.strftime("%s"))*1000)
This gave the result:
'1334855221000'
This value looks very close to the result I got from javascript console.
the value of nowdtime is
datetime.datetime(2012, 4, 19, 22, 37, 1, 866262)
My doubt is why nowdtime.strftime("%s") returns number of seconds since epoch?
If I give nowdtime.strftime("%H") ,it will only return 22 which is the hour according to 24 hr clock.