|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #80185 jdtounix() fails after 2037
Submitted: 2020-10-04 19:04 UTC Modified: 2020-10-07 09:02 UTC
From: php at y-mail dot ml Assigned: cmb (profile)
Status: Closed Package: *Calendar problems
PHP Version: 7.4.11 OS: Ubuntu 20.04
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: php at y-mail dot ml
New email:
PHP Version: OS:


 [2020-10-04 19:04 UTC] php at y-mail dot ml
I tried to calculate dates for a few years ahead and it turned out not that the jdtounix function does not work after the year 2037.

Test script:

var_dump(jdtounix(2465712)); // => false


Add a Patch

Pull Requests

Pull requests:

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2020-10-04 19:07 UTC]
Probably, you should start planning to not use that function at some point in the next 17 years.
 [2020-10-04 19:11 UTC] php at y-mail dot ml
-Status: Open +Status: Closed
 [2020-10-04 19:11 UTC] php at y-mail dot ml
Dan replied to me, no longer relevant.
Thank you.
 [2020-10-04 20:28 UTC]
-Status: Closed +Status: Re-Opened
 [2020-10-04 20:28 UTC]
Actually, I'm not sure it isn't a bug, so I've reopened it.

For systems that use 64 bit time_t, the unix times will still work. 

But for this function, it seems to be hard-coded to return false after day 24755

That hard-coding could be removed for systems that support 64 bit time.

So maybe you can keep using that function.
 [2020-10-07 09:02 UTC]
-Summary: jdtounix not work after 2037 +Summary: jdtounix() fails after 2037 -Status: Re-Opened +Status: Verified -Assigned To: +Assigned To: cmb
 [2020-10-07 09:03 UTC]
The following pull request has been associated:

Patch Name: Fix #80185: jdtounix() fails after 2037
On GitHub:
 [2020-10-07 12:10 UTC]
Automatic comment on behalf of
Log: Fix #80185: jdtounix() fails after 2037
 [2020-10-07 12:10 UTC]
-Status: Verified +Status: Closed
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Jul 22 17:01:31 2024 UTC