Can anyone explain why strtotime('cast') r

2020-04-11 18:09发布

问题:

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 date.

I was just wondering if anyone knew what significance the word cast has when it comes to time functions

Thanks!

回答1:

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