mktime()使用date()夏令时知道吗? [英] is mktime() using date() daylight saving aware?

查看:221
本文介绍了mktime()使用date()夏令时知道吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在s.o上已阅读了有关此问题的几个问题.而且似乎都没有人直率地问或回答这个问题:

I've read through a few questions about this here on s.o. and none seem to ask or answer the question very bluntly:

$ts_today = mktime( 0, 0, 0, date('m'), date('d'), date('Y') );

这个夏令时知道吗?

如果没有,我如何使mktime()意识到夏令时?

if not, how do i make mktime() daylight saving aware?

推荐答案

〜关于 the PHP网站本身,以及一些有用的示例.简而言之,较新版本的PHP将DST作为时区处理功能的一部分考虑在内

~There's plenty of discussion of this on the PHP site itself, and some useful examples. In short, newer versions of PHP take account of DST as part of the timezone handling functionality

这篇关于mktime()使用date()夏令时知道吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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