Jump to content

Can't save date 20+ years in the futre


Entice
 Share

Recommended Posts

So I've ran into this weird issue where I can't save a date that has a year 2038 or later. I'm hard coding these dates in when I save the date field. Here's what I get when I print out the results:

\site\assets\cache\FileCompiler\inc\functions.php:40:string 'Original:2017-12-31 23:59:59' (length=28)
\site\assets\cache\FileCompiler\inc\functions.php:40:string 'Updating to 2035-12-31 23:59:59' (length=31)
\site\assets\cache\FileCompiler\inc\functions.php:40:string 'Result:2035-12-31 23:59:59' (length=26)
\site\assets\cache\FileCompiler\inc\functions.php:40:string 'Updating to 2036-12-31 23:59:59' (length=31)
\site\assets\cache\FileCompiler\inc\functions.php:40:string 'Result:2036-12-31 23:59:59' (length=26)
\site\assets\cache\FileCompiler\inc\functions.php:40:string 'Updating to 2037-12-31 23:59:59' (length=31)
\site\assets\cache\FileCompiler\inc\functions.php:40:string 'Result:2037-12-31 23:59:59' (length=26)
\site\assets\cache\FileCompiler\inc\functions.php:40:string 'Updating to 2038-12-31 23:59:59' (length=31)
\site\assets\cache\FileCompiler\inc\functions.php:40:string 'Result:' (length=7)
\site\assets\cache\FileCompiler\inc\functions.php:40:string 'Updating to 2039-12-31 23:59:59' (length=31)
\site\assets\cache\FileCompiler\inc\functions.php:40:string 'Result:' (length=7)
\site\assets\cache\FileCompiler\inc\functions.php:40:string 'Updating to 2040-12-31 23:59:59' (length=31)
\site\assets\cache\FileCompiler\inc\functions.php:40:string 'Result:' (length=7)
\site\assets\cache\FileCompiler\inc\functions.php:40:string 'Updating to 2041-12-31 23:59:59' (length=31)
\site\assets\cache\FileCompiler\inc\functions.php:40:string 'Result:' (length=7)

So I start with my date field set as today's date. Then I incrementally set the date starting from the year 2035 till 2038. Each time, I'm pulling the saved result of the field for the page.

But when It gets up to 2038, it can't save that year, nor any year past 2038 (Which is roughly 20+ years in the future). Am I missing something here?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...