skyboy
V2EX  ›  问与答

关于 php 取时间戳的函数

  •  
  •   skyboy · Dec 19, 2016 · 1465 views
    This topic created in 3462 days ago, the information mentioned may be changed or developed.

    我问一个事情,在同一时间内,执行

    date_default_timezone_set("PRC"); echo time();

    date_default_timezone_set("UTC"); echo time();

    取出的时间戳的值一样相等吗。

    就是说,在执行 time()前,设置时区有用吗,和不设置取到的结果有区别吗。

    2123123
        1
    2123123  
       Dec 19, 2016
    Unixtime 跟时区没关系
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   891 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 20:20 · PVG 04:20 · LAX 13:20 · JFK 16:20
    ♥ Do have faith in what you're doing.