Entice Posted March 4, 2017 Share Posted March 4, 2017 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 More sharing options...
fbg13 Posted March 4, 2017 Share Posted March 4, 2017 Maybe it's this https://en.wikipedia.org/wiki/Year_2038_problem Link to comment Share on other sites More sharing options...
Entice Posted March 4, 2017 Author Share Posted March 4, 2017 Huh...that's like the Y2K bug. Didn't know about this. Looks like my live server is handling it correctly. I'm guessing linux have already distributed a fix for it then. Thanks. Link to comment Share on other sites More sharing options...
adrian Posted March 4, 2017 Share Posted March 4, 2017 I believe this requested change: https://github.com/processwire/processwire-requests/issues/25 to PW will fix it so long as the server is 64bit. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now