Jump to content

Recommended Posts

Posted

Hello One year working with PW and no need to ask for help, but today have something funny going on in my date time field. 

When i input a year in the PW backend link 1867-01-01 it will be saved to the mysql database, when i reload the page, the field doesn't show up in the PW backend. 

When i try to output also no luck.

When i enter the year 1902-01-01 no problems for display in the front and backend. 

I made another date time field and got the same problem.

Anyone any ideas how to troubleshoot this issue?

I am running on version 2.7.2

Posted

Unix timestamps do start in 1970. All times / dates before that can therefore not be translated to a timestamp and not be saved. I'm just not sure, why it's saving a date for 1902 correctly.

Edit: Ah php does work with negative integers as well. The max size for an integer (32 bit) would be -2147483648 which translates to 1901/12/13 20:45:52. So maybe it's still an issue with not being able to translate to a timestamp.

  • Like 1
  • 2 weeks later...
Posted

The datetime implementation certainly should in my mind. But some system fields like created or alike wouldn't really benefit from a change. Not sure if people already used processwire back then :D

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
×
×
  • Create New...