请问V2EX API提供的json数据中created元和last_modified元代表的一串数字是什么含义? - V2EX
V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
gaolinjie
V2EX    API

请问V2EX API提供的json数据中created元和last_modified元代表的一串数字是什么含义?

  •  
  •   gaolinjie 2012-12-11 00:00:29 +08:00 3970 次点击
    这是一个创建于 4689 天前的主题,其中的信息可能已经有所发展或是发生改变。
    http://www.v2ex.com/api/replies/show.json?topic_id=2
    返回的json数据如下:
    [{

    "id" : 2,
    "title" : "访问速度?",
    "url" : "http://www.v2ex.com/t/2",
    "content" : "大家目前访问这个网站的速度如何?\u000D\u000A\u000D\u000A我还没有把任何 cache 打开。",
    "content_rendered" : "大家目前访问这个网站的速度如何?\u000D\u000A\u003Cbr /\u003E\u000D\u000A\u003Cbr /\u003E我还没有把任何 cache 打开。",
    "replies" : 43,
    "member" : {
    "id" : 1,
    "username" : "Livid",
    "tagline" : "Beautifully Advance",
    "avatar_mini" : "http://cdn.v2ex.com/avatar/c4ca/4238/1_mini.png?m=1353664649",
    "avatar_normal" : "http://cdn.v2ex.com/avatar/c4ca/4238/1_normal.png?m=1353664649",
    "avatar_large" : "http://cdn.v2ex.com/avatar/c4ca/4238/1_large.png?m=1353664649"
    },
    "node" : {
    "id" : 1,
    "name" : "babel",
    "title" : "Project Babel",
    "url" : "http://www.v2ex.com/go/babel",
    "topics" : 1040,
    "avatar_mini" : "http://www.v2ex.com/static/img/node_mini.png",
    "avatar_normal" : "http://www.v2ex.com/static/img/node_normal.png",
    "avatar_large" : "http://www.v2ex.com/static/img/node_large.png"
    },
    "created" : 1272207731,
    "last_modified" : 1335106658,
    "last_touched" : 1294932324

    }]

    但是一直搞不清"created" : 1272207731,
    "last_modified" : 1335106658,
    "last_touched" : 1294932324
    的含义,为什么是这么一串数字?
    6 条回复    1970-01-01 08:00:00 +08:00
    gaolinjie
        1
    gaolinjie  
    OP
       2012-12-11 00:00:52 +08:00
    best1a
        2
    best1a  
       2012-12-11 00:07:19 +08:00
    目测是从1970年1月1日0时起的秒数...
    ElmerZhang
        3
    ElmerZhang  
       2012-12-11 01:10:25 +08:00
    Unix 时间戳
    reus
        4
    reus  
       2012-12-11 01:19:41 +08:00
    从1970年1月1日0点起的秒数
    chrisyipw
        5
    chrisyipw  
       2012-12-11 05:45:23 +08:00
    Milliseconds,只是最后三位,即毫秒,没显示而已(比如 Ruby 把毫秒放在小数点后,转整数就会砍掉),只保留了年月日时分秒信息。对于毫秒也属于整数一部分的语言(如 Javascript),要转换成 Date 对象,只需乘以 1000。
    用 milliseconds 做时间的单位,好处是只需要处理数字(比如日期大小、比如距今多少天),并且省去时区的隐患:得出结果后再转时区。
    Livid
        6
    Livid  
    MOD
    PRO
       2012-12-11 07:33:47 +08:00
    关于     帮助文档     自助推广系统     博客     API     FAQ     Solana     5558 人在线   最高记录 6679       Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 24ms UTC 08:27 PVG 16:27 LAX 01:27 JFK 04:27
    Do have faith in what you're doing.
    ubao snddm index pchome yahoo rakuten mypaper meadowduck bidyahoo youbao zxmzxm asda bnvcg cvbfg dfscv mmhjk xxddc yybgb zznbn ccubao uaitu acv GXCV ET GDG YH FG BCVB FJFH CBRE CBC GDG ET54 WRWR RWER WREW WRWER RWER SDG EW SF DSFSF fbbs ubao fhd dfg ewr dg df ewwr ewwr et ruyut utut dfg fgd gdfgt etg dfgt dfgd ert4 gd fgg wr 235 wer3 we vsdf sdf gdf ert xcv sdf rwer hfd dfg cvb rwf afb dfh jgh bmn lgh rty gfds cxv xcv xcs vdas fdf fgd cv sdf tert sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf sdf shasha9178 shasha9178 shasha9178 shasha9178 shasha9178 liflif2 liflif2 liflif2 liflif2 liflif2 liblib3 liblib3 liblib3 liblib3 liblib3 zhazha444 zhazha444 zhazha444 zhazha444 zhazha444 dende5 dende denden denden2 denden21 fenfen9 fenf619 fen619 fenfe9 fe619 sdf sdf sdf sdf sdf zhazh90 zhazh0 zhaa50 zha90 zh590 zho zhoz zhozh zhozho zhozho2 lislis lls95 lili95 lils5 liss9 sdf0ty987 sdft876 sdft9876 sdf09876 sd0t9876 sdf0ty98 sdf0976 sdf0ty986 sdf0ty96 sdf0t76 sdf0876 df0ty98 sf0t876 sd0ty76 sdy76 sdf76 sdf0t76 sdf0ty9 sdf0ty98 sdf0ty987 sdf0ty98 sdf6676 sdf876 sd876 sd876 sdf6 sdf6 sdf9876 sdf0t sdf06 sdf0ty9776 sdf0ty9776 sdf0ty76 sdf8876 sdf0t sd6 sdf06 s688876 sd688 sdf86