zarte
V2EX  ›  问与答

PHP strtotime 1900 年前的日期在不同系统值不一样

  •  
  •   zarte · Jun 3, 2020 · 800 views
    This topic created in 2208 days ago, the information mentioned may be changed or developed.
    date_default_timezone_set('PRC');
    $sbegintime = strtotime('1900-01-01 00:00:00');
    var_dump($sbegintime);exit;
    

    linux:-2209017600
    win10:-2209017943
    1901 之后的日期是正常的
    php 大版本都是 7

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2451 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 157ms · UTC 11:03 · PVG 19:03 · LAX 04:03 · JFK 07:03
    ♥ Do have faith in what you're doing.