慕课网模拟登入时候,有个验证码,貌似是用时间戳拼接的。
登入url:http://www.imooc.com/user/new...
但我用python还原这个时间,怎么都对不上
In[26]: print time.localtime(14814439953.40)
time.struct_time(tm_year=2439, tm_mon=6, tm_mday=14, tm_hour=18, tm_min=12, tm_sec=33, tm_wday=1, tm_yday=165, tm_isdst=0)
格式化下:
In[27]: print time.strftime('%Y%m%d %H:%M:%S', time.localtime(14814439953.40));
24390614 18:12:33
这是为咋的?
是时间戳再处理过还是还原的不对,还是不是时间戳来着的?
means that it is the timestamp of js. The timestamp of js is at the millisecond level, which is not at the same level as that of python, so this operation is fine:
You can see it’s exactly today’s time
1481443995340 This is obviously not a timestamp. The format is wrong
This is the timestamp of js, divided by 1000