Bug #74691 [Opn->Fbk]: Novosibirsk Data Time Anomaly

From: Date: Fri, 02 Jun 2017 11:29:10 +0000
Subject: Bug #74691 [Opn->Fbk]: Novosibirsk Data Time Anomaly
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-209361@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=74691&edit=1

 ID:                 74691
 Updated by:         derick@php.net
 Reported by:        karpulix at ya dot ru
 Summary:            Novosibirsk Data Time Anomaly
-Status:             Open
+Status:             Feedback
 Type:               Bug
 Package:            Date/time related
 Operating System:   All
 PHP Version:        7.1.5
 Block user comment: N
 Private report:     N

 New Comment:

Can you add the Actual and Expected output please?


Previous Comments:
------------------------------------------------------------------------
[2017-06-02 11:20:34] karpulix at ya dot ru

Description:
------------
Incorrect time interval in the Novosibirsk time zone. The problem is easy to reproduce on any server
----------------------
Некорректный интервал
времени Новосибирском
часовом поясе. Проблему
легко воспроизвести на
любом сервере

Test script:
---------------
$datetime_start = new DateTime('02.06.2015',new DateTimeZone("Europe/Moscow"));
$datetime_end = new DateTime('02.06.2017',new DateTimeZone("Europe/Moscow"));
print_r($datetime_end->getTimestamp() - $datetime_start->getTimestamp());
echo PHP_EOL;
$datetime_start = new DateTime('02.06.2015',new
DateTimeZone("America/New_York"));
$datetime_end = new DateTime('02.06.2017',new DateTimeZone("America/New_York"));
print_r($datetime_end->getTimestamp() - $datetime_start->getTimestamp());
echo PHP_EOL;
$datetime_start = new DateTime('02.06.2015',new
DateTimeZone("Asia/Novosibirsk"));
$datetime_end = new DateTime('02.06.2017',new DateTimeZone("Asia/Novosibirsk"));
print_r($datetime_end->getTimestamp() - $datetime_start->getTimestamp());
echo PHP_EOL;



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



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


Thread (9 messages)

« previous php.bugs (#209361) next »