Skip to content

strtotime() malfunction with year 1959 and previous #15945

@rodiniaweb

Description

@rodiniaweb

Description

Today is September 18th. The following code:

<?php

date_default_timezone_set('Europe/Madrid');
echo date('Y-m-d',strtotime('1959'));

Resulted in this output:

2024-09-18

But I expected this output instead:

1959-09-18

If you use 1960 and following years, it works as expected.

PHP Version

PHP 8.3.10

Operating System

No response

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