V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
skyboy
V2EX  ›  问与答

关于 php 取时间戳的函数

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