skyboy
V2EX  ›  问与答

关于 php 取时间戳的函数

  •  
  •   skyboy · Dec 19, 2016 · 1588 views
    This topic created in 3535 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   ·   3309 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 11:50 · PVG 19:50 · LAX 04:50 · JFK 07:50
    ♥ Do have faith in what you're doing.