acthtml
V2EX  ›  问与答

为什么在安卓设备下 new Date('1986/5/4') 出来的时间是 1985-05-03 23:00:00 ?

  •  
  •   acthtml · Sep 23, 2014 · 4946 views
    This topic created in 4427 days ago, the information mentioned may be changed or developed.
    12 replies  •  2014-09-24 10:22:54 +08:00
    wzxjohn
    wzxjohn
    Sep 23, 2014
    2
    赞,又学到新姿势了。
    mornlight
    mornlight
    Sep 23, 2014
    4
    这种坑真是...
    jimbray
    jimbray
    Sep 23, 2014
    5
    好坑......涨姿势了
    Exin
    Exin
    Sep 23, 2014 via iPhone
    6
    好坑
    iyaozhen
    iyaozhen
    Sep 23, 2014
    7
    真是涨姿势了
    learnshare
    learnshare
    Sep 23, 2014
    8
    是有多坑~
    hahastudio
    hahastudio
    Sep 23, 2014
    9
    但是我的 Chrome 就没这样呢= =
    Window 7,Chrome 37.0.2062.120 m

    new Date(1986, 4, 4)
    Sun May 04 1986 00:00:00 GMT+0800 (China Standard Time)
    new Date(1986, 4, 4, 0, 59, 59, 0)
    Sun May 04 1986 00:59:59 GMT+0800 (China Standard Time)
    new Date(1986, 4, 4, 0, 59, 59, 1000)
    Sun May 04 1986 01:00:00 GMT+0800 (China Standard Time)
    hahastudio
    hahastudio
    Sep 23, 2014
    10
    好像 OS X 和 Ubuntu 都是同样的情况,只有 Windows 不同= =?
    barbery
    barbery
    Sep 23, 2014
    11
    @hahastudio windows pc下表示没事。。。可能是在手机上才有吧~
    kfll
    kfll
    Sep 24, 2014
    12
    ...我很好奇地被 1986 变 1985 勾引进来......结果发现是手误
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2063 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 46ms · UTC 02:33 · PVG 10:33 · LAX 18:33 · JFK 21:33
    ♥ Do have faith in what you're doing.