skyboy
V2EX  ›  问与答

关于 php 取时间戳的函数

  •  
  •   skyboy · Dec 19, 2016 · 1461 views
    This topic created in 3458 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   ·   1511 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 16:30 · PVG 00:30 · LAX 09:30 · JFK 12:30
    ♥ Do have faith in what you're doing.