Skip to content

strtotime  #16383

@xinghailong

Description

@xinghailong

Description

The following code:

<?php
date_default_timezone_set('Asia/Shanghai');
echo date_default_timezone_get();
echo "\r\n";
echo strtotime('1988-04-12 00:00:00');
echo "\r\n";

PHP 8.1.19 (cli) (built: May 26 2023 15:33:22) (NTS)
Resulted in this output:

Asia/Shanghai
576777600

PHP 7.1.11 (cli) (built: Jul 27 2021 17:03:31) ( NTS )
Resulted in this output:

Asia/Shanghai
576774000

This problem can only be reproduced from 1988-04-11 to 1988-04-17. I have tried several other times but have not been able to reproduce it.

NAME="CentOS Linux"
VERSION="7 (Core)"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="7"
PRETTY_NAME="CentOS Linux 7 (Core)"
ANSI_COLOR="0;31"

PHP Version

7.1.11

Operating System

CentOS Linux 7 (Core)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions