Can anyone explain why strtotime('cast') returns a value?

前端 未结 1 1324
灰色年华
灰色年华 2021-01-21 05:25

Not really an issue (although it is conflicting with an if() statement we have), but when you type in strtotime(\'cast\'), it returns an actual value that defaults to today\'s d

1条回答
  •  清歌不尽
    2021-01-21 05:48

    It maps to the timezone offset for "Australia/Adelaide".

    Example:

    echo date('Y-m-d H:i:s'), "\n",
         date('Y-m-d H:i:s', strtotime("cast")), "\n",
         date('Y-m-d H:i:s', strtotime("Australia/Adelaide"));
    

    Prints:

    2016-08-25 10:48:44
    2016-08-25 01:18:44
    2016-08-25 01:18:44
    

    0 讨论(0)
提交回复
热议问题