Bug #70870 [Opn->Nab]: datetime bug

From: Date: Fri, 06 Nov 2015 12:35:04 +0000
Subject: Bug #70870 [Opn->Nab]: datetime bug
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-197077@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=70870&edit=1

 ID:                 70870
 Updated by:         requinix@php.net
 Reported by:        samgolam at 163 dot com
 Summary:            datetime bug
-Status:             Open
+Status:             Not a bug
 Type:               Bug
 Package:            Date/time related
 Operating System:   CENTOS 6.5
 PHP Version:        5.6.15
 Block user comment: N
 Private report:     N

 New Comment:

Assuming you are using the timezone for China,

Daylight savings in 1986 began on 05-04 at 00:00:00 when the clocks moved forward one hour to
01:00:00. That means 1986-05-04 00:00:00 never happened.

Same for the other dates.


Previous Comments:
------------------------------------------------------------------------
[2015-11-06 10:52:33] samgolam at 163 dot com

Description:
------------
date('Y-m-d H:i:s',strtotime('1986-05-04 00:00:00')) resutl equl 1986-05-04
01:00:00
$arr = array(
'1986-05-04 00:00:00',
'1987-04-12 00:00:00',
'1988-04-10 00:00:00',
'1989-04-16 00:00:00',
'1990-04-15 00:00:00',
'1991-04-14 00:00:00'
);
just 6 day
Datetime is same as this

Test script:
---------------
$arr = array(
'1986-05-04 00:00:00',
'1987-04-12 00:00:00',
'1988-04-10 00:00:00',
'1989-04-16 00:00:00',
'1990-04-15 00:00:00',
'1991-04-14 00:00:00'
);
foreach($arr as $date){
    echo date('Y-m-d H:i:s',strtotime($date));
}
/**
'1986-05-04 01:00:00',
'1987-04-12 01:00:00',
'1988-04-10 01:00:00',
'1989-04-16 01:00:00',
'1990-04-15 01:00:00',
'1991-04-14 01:00:00'
**/




------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=70870&edit=1


Thread (2 messages)

« previous php.bugs (#197077) next »