Bug #74232 [NEW]: strtotime different output from centos and ubuntu
| From: | 729021170 at qq dot com | Date: | Fri, 10 Mar 2017 05:51:58 +0000 |
| Subject: | Bug #74232 [NEW]: strtotime different output from centos and ubuntu | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-207767@lists.php.net to get a copy of this message | ||
From: 729021170 at qq dot com
Operating system: centos
PHP version: 5.6.30
Package: Unknown/Other Function
Bug Type: Bug
Bug description:strtotime different output from centos and ubuntu
Description:
------------
the above is centos, the below is ubuntu, strtotime('1927-12-31
23:54:02') is different (-1325491915, -1325491558)
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Thread(s) per core: 1
Core(s) per socket: 1
Socket(s): 4
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 63
Stepping: 2
CPU MHz: 2400.058
BogoMIPS: 4800.11
Hypervisor vendor: Xen
Virtualization type: full
L1d cache: 32K
L1i cache: 32K
L2 cache: 256K
L3 cache: 15360K
NUMA node0 CPU(s): 0-3
1927-12-31 23:54:00 -1325491917
1927-12-31 23:54:01 -1325491916
1927-12-31 23:54:02 -1325491915
1927-12-31 23:54:03 -1325491557
1927-12-31 23:54:04 -1325491556
1927-12-31 23:54:05 -1325491555
1927-12-31 23:54:06 -1325491554
1927-12-31 23:54:07 -1325491553
1927-12-31 23:54:08 -1325491552
1927-12-31 23:54:09 -1325491551
Architecture: x86_64
CPU è¿è¡æ¨¡å¼ï¼ 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
æ¯ä¸ªæ ¸ççº¿ç¨æ°ï¼ 2
æ¯ä¸ªåº§çæ ¸æ°ï¼ 2
Socket(s): 1
NUMA èç¹ï¼ 1
åå IDï¼ GenuineIntel
CPU ç³»åï¼ 6
åå·ï¼ 78
Model name: Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz
æ¥è¿ï¼ 3
CPU MHzï¼ 429.562
CPU max MHz: 2800.0000
CPU min MHz: 400.0000
BogoMIPS: 4800.44
èæåï¼ VT-x
L1d ç¼åï¼ 32K
L1i ç¼åï¼ 32K
L2 ç¼åï¼ 256K
L3 ç¼åï¼ 3072K
NUMA node0 CPU(s): 0-3
1927-12-31 23:54:00 -1325491560
1927-12-31 23:54:01 -1325491559
1927-12-31 23:54:02 -1325491558
1927-12-31 23:54:03 -1325491557
1927-12-31 23:54:04 -1325491556
1927-12-31 23:54:05 -1325491555
1927-12-31 23:54:06 -1325491554
1927-12-31 23:54:07 -1325491553
1927-12-31 23:54:08 -1325491552
1927-12-31 23:54:09 -1325491551
Test script:
---------------
<?php
$start = strtotime('1927-12-31 23:54:00');
for ($i = 0; $i < 10; $i++) {
$tmp = strtotime("+$i seconds", $start);
echo date("Y-m-d H:i:s", $tmp) . " " . $tmp . "\n";
}
--
Edit bug report at https://bugs.php.net/bug.php?id=74232&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=74232&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=74232&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=74232&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=74232&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=74232&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=74232&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=74232&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=74232&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=74232&r=support
Expected behavior: https://bugs.php.net/fix.php?id=74232&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=74232&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=74232&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=74232&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=74232&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=74232&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=74232&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=74232&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=74232&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=74232&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=74232&r=mysqlcfg