谁能解释为什么strtotime('cast')返回一个值? [英] Can anyone explain why strtotime('cast') returns a value?

查看:68
本文介绍了谁能解释为什么strtotime('cast')返回一个值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这并不是一个真正的问题(尽管它与我们的if()语句冲突),但是当您键入strtotime('cast')时,它会返回一个默认值为今天的实际值。

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

谢谢!

推荐答案

它映射到澳大利亚/阿德莱德的时区偏移量

示例:

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"));

打印:

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

这篇关于谁能解释为什么strtotime('cast')返回一个值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆