strtotime支持的有效时间戳
来源:互联网 发布:选择打印机端口 怎么选 编辑:程序博客网 时间:2024/05/24 06:19
今天发现一个有趣的现象
***********test.php*************************
<?php
$a = date("Y-m-d H:i:s", strtotime("2038-09-01"));
echo $a;
--------------------------------------------
:!php test.php
1970-01-01 07:00:00
查了下手册中关于strtotime的描述,注意到这段话
Note:
有效的时间戳通常从 Fri, 13 Dec 1901 20:45:54 GMT 到 Tue, 19 Jan 2038 03:14:07 GMT(对应于 32 位有符号整数的最小值和最大值)。不是所有的平台都支持负的时间戳,那么日记范围就被限制为不能早于 Unix 纪元。这意味着在 1970 年 1 月 1 日之前的日期将不能用在 Windows,一些 Linux 版本,以及几个其它的操作系统中。不过 PHP 5.1.0 及更新的版本克服了此限制。
而对于64位的系统有效的时间戳则几乎是无穷的。(For 64-bit versions of PHP, the valid range of a timestamp is effectively infinite, as 64 bits can represent approximately 293 billion years in either direction.)
soga!
***********test.php*************************
<?php
$a = date("Y-m-d H:i:s", strtotime("2038-09-01"));
echo $a;
--------------------------------------------
:!php test.php
1970-01-01 07:00:00
查了下手册中关于strtotime的描述,注意到这段话
Note:
有效的时间戳通常从 Fri, 13 Dec 1901 20:45:54 GMT 到 Tue, 19 Jan 2038 03:14:07 GMT(对应于 32 位有符号整数的最小值和最大值)。不是所有的平台都支持负的时间戳,那么日记范围就被限制为不能早于 Unix 纪元。这意味着在 1970 年 1 月 1 日之前的日期将不能用在 Windows,一些 Linux 版本,以及几个其它的操作系统中。不过 PHP 5.1.0 及更新的版本克服了此限制。
而对于64位的系统有效的时间戳则几乎是无穷的。(For 64-bit versions of PHP, the valid range of a timestamp is effectively infinite, as 64 bits can represent approximately 293 billion years in either direction.)
soga!
- strtotime支持的有效时间戳
- strtotime('yesterday')与strtotime('-1 day')获取的时间戳
- PHP的时间函数strtotime
- 时间戳解析方法strtotime
- strtotime时间
- PHP的时间加减的函数strtotime
- PHP的时间加减的函数strtotime
- 将日期转换成时间戳 strtotime
- PHP时间戳 strtotime()使用方法和技巧
- PHP时间戳 strtotime()使用方法和技巧
- PHP - strtotime time FROM_UNIXTIME UNIX_TIMESTAMP 常用的时间&时间戳处理函数
- PHP的strtotime计算2038年以上日期的时间戳错误
- 计算有效时间的时间戳
- php strtotime()处理时间
- php strtotime()函数对时间 加减的妙用 (实例)
- PHP 时间的获取和使用 date()和strtotime()函数
- PHP 日期转换为时间戳 strtotime 与 mktime 函数
- PHP 日期转换为时间戳 strtotime 与 mktime 函数
- 转!IBM发布多项前沿技术方案揭示社交商务新趋势
- 简要解释一下activity、 intent 、intent filter、service、Broadcast、BroadcaseReceiver
- Oracle 10g 出现Io 异常:Unknown host specified
- 判断单链表是否存在环,判断两个链表是否相交问题详解
- C++学习笔记:迭代器
- strtotime支持的有效时间戳
- STL 线程安全性
- STL学习(一)
- Android 中的拿来主义(编译,反编译,AXMLPrinter2,smali,baksmali)
- stm32进入standby模式
- mini2440 linux2.6 内核制作--initramfs 启动
- 编译EABI-4.3.3+busybox-1.13.0报错-重定义struct iphdr
- 建新站时要考虑的问题
- IOS利用Core Text对文字进行排版